Files
swift-mirror/test/sil-llvm-gen/alloc.sil
Erik Eckstein 6375647383 driver: add swift-frontend options to select the tool to run
Tool selection is primarily done by checking the executable (= symlink) name.
But sometimes (e.g. if the tool symlink is not there) it's useful to have an option for selecting the tool.
The selection option (e.g. -sil-opt) must be the first argument of swift-frontend.
2023-04-28 15:18:16 +02:00

28 lines
1.5 KiB
Plaintext

// RUN: %sil-llvm-gen -disable-legacy-type-info -output-kind=llvm-as -target x86_64-apple-macosx10.9 -module-name main %s -o - | %FileCheck %s
// RUN: %sil-llvm-gen -disable-legacy-type-info -output-kind=llvm-as -target i386-apple-ios7.0 %s -module-name main -o - | %FileCheck %s
// RUN: %sil-llvm-gen -disable-legacy-type-info -output-kind=llvm-as -target x86_64-apple-ios7.0 %s -module-name main -o - | %FileCheck %s
// RUN: %sil-llvm-gen -disable-legacy-type-info -output-kind=llvm-as -target armv7-apple-ios7.0 %s -module-name main -o - | %FileCheck %s
// RUN: %sil-llvm-gen -disable-legacy-type-info -output-kind=llvm-as -target arm64-apple-ios7.0 %s -module-name main -o - | %FileCheck %s
// RUN: %sil-llvm-gen -disable-legacy-type-info -output-kind=llvm-as -target x86_64-unknown-linux-gnu %s -module-name main -o - | %FileCheck %s
// Use this testfile to check if the `swift-frontend -sil-llvm-gen` option works.
// RUN: %swift_frontend_plain -sil-llvm-gen -disable-legacy-type-info -output-kind=llvm-as -target x86_64-apple-macosx10.9 -module-name main %s -o - | %FileCheck %s
// REQUIRES: CODEGENERATOR=X86
// REQUIRES: CODEGENERATOR=ARM
import Builtin
struct Pair<T> {
var fst: T, snd: T
}
struct Huge {
var pairs: Pair<Pair<Pair<Pair<Pair<Pair<Pair<Pair<Pair<Builtin.Int64>>>>>>>>>
var unalign: Builtin.Int8
}
// CHECK: define linkonce_odr hidden i8* @__swift_memcpy4097_8(i8* %0, i8* %1, %swift.type* %2)
// CHECK: call void @llvm.memcpy.p0i8.p0i8.{{(i64|i32)}}(i8* align 8 %0, i8* align 8 %1, {{(i64|i32)}} 4097, i1 false)
// CHECK: ret i8* %0