1
1
// RUN: %empty-directory(%t)
2
2
// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -import-objc-header %S/Inputs/c_functions.h -primary-file %s -emit-ir | %FileCheck %s
3
+ // RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -import-objc-header %S/Inputs/c_functions.h -primary-file %s -emit-ir | %FileCheck %s --check-prefix=%target-cpu
3
4
4
5
// This is deliberately not a SIL test so that we can test SILGen too.
5
6
@@ -18,8 +19,16 @@ func test_indirect_by_val_alignment() {
18
19
log_a_thing ( x)
19
20
}
20
21
21
- // CHECK-LABEL: define hidden swiftcc void @_T011c_functions30test_indirect_by_val_alignmentyyF()
22
- // CHECK: %indirect-temporary = alloca %TSC7a_thingV, align [[ALIGN:[0-9]+]]
23
- // CHECK: [[CAST:%.*]] = bitcast %TSC7a_thingV* %indirect-temporary to %struct.a_thing*
24
- // CHECK: call void @log_a_thing(%struct.a_thing* byval align [[ALIGN]] [[CAST]])
25
- // CHECK: define internal void @log_a_thing(%struct.a_thing* byval align [[ALIGN]]
22
+ // x86_64-LABEL: define hidden swiftcc void @_T011c_functions30test_indirect_by_val_alignmentyyF()
23
+ // x86_64: %indirect-temporary = alloca %TSC7a_thingV, align [[ALIGN:[0-9]+]]
24
+ // x86_64: [[CAST:%.*]] = bitcast %TSC7a_thingV* %indirect-temporary to %struct.a_thing*
25
+ // x86_64: call void @log_a_thing(%struct.a_thing* byval align [[ALIGN]] [[CAST]])
26
+ // x86_64: define internal void @log_a_thing(%struct.a_thing* byval align [[ALIGN]]
27
+
28
+
29
+ // We only want to test x86_64.
30
+ // arm64: define hidden swiftcc void @_T011c_functions30test_indirect_by_val_alignmentyyF()
31
+ // armv7k: define hidden swiftcc void @_T011c_functions30test_indirect_by_val_alignmentyyF()
32
+ // armv7s: define hidden swiftcc void @_T011c_functions30test_indirect_by_val_alignmentyyF()
33
+ // armv7: define hidden swiftcc void @_T011c_functions30test_indirect_by_val_alignmentyyF()
34
+ // i386: define hidden swiftcc void @_T011c_functions30test_indirect_by_val_alignmentyyF()
0 commit comments