Skip to content

Commit 7522bf7

Browse files
committed
[rebranch][test] Adjust tests where LLVM parameter attribute order changed
1 parent d75128f commit 7522bf7

File tree

69 files changed

+285
-285
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

69 files changed

+285
-285
lines changed

test/AutoDiff/IRGen/differentiable_function.sil

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ bb0:
3333
return %result : $@differentiable(reverse) @callee_guaranteed (Float) -> Float
3434
}
3535

36-
// CHECK-LABEL: define{{.*}}test_form_diff_func(ptr noalias captures(none) sret(<{ %swift.function, %swift.function, %swift.function }>)
36+
// CHECK-LABEL: define{{.*}}test_form_diff_func(ptr noalias sret(<{ %swift.function, %swift.function, %swift.function }>) captures(none)
3737
// CHECK-SAME: [[OUT:%.*]])
3838
// CHECK: [[OUT_ORIG:%.*]] = getelementptr{{.*}}[[OUT]], i32 0, i32 0
3939
// CHECK: [[OUT_ORIG_FN:%.*]] = getelementptr{{.*}}[[OUT_ORIG]], i32 0, i32 0
@@ -60,7 +60,7 @@ bb0(%0 : $@differentiable(reverse) @callee_guaranteed (Float) -> Float):
6060
return %result : $(@callee_guaranteed (Float) -> Float, @callee_guaranteed (Float) -> (Float, @owned @callee_guaranteed (Float) -> Float), @callee_guaranteed (Float) -> (Float, @owned @callee_guaranteed (Float) -> Float))
6161
}
6262

63-
// CHECK-LABEL: define{{.*}}@test_extract_components(ptr noalias captures(none) sret(<{ %swift.function, %swift.function, %swift.function }>)
63+
// CHECK-LABEL: define{{.*}}@test_extract_components(ptr noalias sret(<{ %swift.function, %swift.function, %swift.function }>) captures(none)
6464
// CHECK-SAME: [[OUT:%.*]], ptr{{.*}}[[IN:%.*]])
6565
// CHECK: [[ORIG:%.*]] = getelementptr{{.*}}[[IN]], i32 0, i32 0
6666
// CHECK: [[ORIG_FN_ADDR:%.*]] = getelementptr{{.*}}[[ORIG]], i32 0, i32 0

test/Distributed/distributed_actor_accessor_thunks_32bit.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ public distributed actor MyOtherActor {
119119
// CHECK: missing-witness1:
120120
// CHECK-NEXT: call void @llvm.trap()
121121
// CHECK-NEXT: unreachable
122-
// CHECK: call swiftcc void @"$s27FakeDistributedActorSystems0A17InvocationDecoderC18decodeNextArgumentxyKSeRzSERzlF"(%swift.opaque* noalias captures(none) sret(%swift.opaque) [[ARG_0_RES_SLOT]], %swift.type* %arg_type, i8** [[ENCODABLE_WITNESS]], i8** [[DECODABLE_WITNESS]], %T27FakeDistributedActorSystems0A17InvocationDecoderC* swiftself [[DECODER]], %swift.error** noalias captures(none) dereferenceable(4) %swifterror)
122+
// CHECK: call swiftcc void @"$s27FakeDistributedActorSystems0A17InvocationDecoderC18decodeNextArgumentxyKSeRzSERzlF"(%swift.opaque* noalias sret(%swift.opaque) captures(none) [[ARG_0_RES_SLOT]], %swift.type* %arg_type, i8** [[ENCODABLE_WITNESS]], i8** [[DECODABLE_WITNESS]], %T27FakeDistributedActorSystems0A17InvocationDecoderC* swiftself [[DECODER]], %swift.error** noalias captures(none) dereferenceable(4) %swifterror)
123123

124124
// CHECK: store %swift.error* null, %swift.error** %swifterror
125125
// CHECK-NEXT: [[ARG_0_VAL_ADDR:%.*]] = bitcast i8* [[ARG_0_VALUE_BUF]] to %TSi*

test/Distributed/distributed_actor_accessor_thunks_64bit.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ public distributed actor MyOtherActor {
116116
// CHECK: missing-witness1:
117117
// CHECK-NEXT: call void @llvm.trap()
118118
// CHECK-NEXT: unreachable
119-
// CHECK: call swiftcc void @"$s27FakeDistributedActorSystems0A17InvocationDecoderC18decodeNextArgumentxyKSeRzSERzlF"(ptr noalias sret(%swift.opaque) [[ARG_0_VALUE_BUF]], ptr %arg_type, ptr [[ENCODABLE_WITNESS]], ptr [[DECODABLE_WITNESS]], ptr swiftself [[DECODER]], ptr noalias captures(none) swifterror dereferenceable(8) %swifterror)
119+
// CHECK: call swiftcc void @"$s27FakeDistributedActorSystems0A17InvocationDecoderC18decodeNextArgumentxyKSeRzSERzlF"(ptr noalias sret(%swift.opaque) [[ARG_0_VALUE_BUF]], ptr %arg_type, ptr [[ENCODABLE_WITNESS]], ptr [[DECODABLE_WITNESS]], ptr swiftself [[DECODER]], ptr noalias swifterror captures(none) dereferenceable(8) %swifterror)
120120

121121
// CHECK: store ptr null, ptr %swifterror
122122
// CHECK-NEXT: %._value = getelementptr inbounds{{.*}} %TSi, ptr [[ARG_0_VALUE_BUF]], i32 0, i32 0

test/IRGen/abi_v7k.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,7 @@ func testRet3() -> MyRect2 {
296296
}
297297

298298
// Returning tuple?: (Int x 6)?
299-
// CHECK-LABEL: define hidden swiftcc void @"$s8test_v7k7minMax2{{.*}}"(ptr noalias captures(none) sret({{.*}}) %0, i32 %1, i32 %2)
299+
// CHECK-LABEL: define hidden swiftcc void @"$s8test_v7k7minMax2{{.*}}"(ptr noalias sret({{.*}}) captures(none) %0, i32 %1, i32 %2)
300300
// V7K-LABEL: _$s8test_v7k7minMax2
301301
// We will indirectly return an optional with the address in r0, input parameters will be in r1 and r2
302302
// V7K: str r0, [sp, [[IDX:#[0-9]+]]]
@@ -324,7 +324,7 @@ func minMax2(x : Int, y : Int) -> (min: Int, max: Int, min2: Int, max2: Int, min
324324
}
325325

326326
// Returning struct?: {Int x 6}?
327-
// CHECK-LABEL: define hidden swiftcc void @"$s8test_v7k7minMax3{{.*}}"(ptr noalias captures(none) sret({{.*}}) %0, i32 %1, i32 %2)
327+
// CHECK-LABEL: define hidden swiftcc void @"$s8test_v7k7minMax3{{.*}}"(ptr noalias sret({{.*}}) captures(none) %0, i32 %1, i32 %2)
328328
// V7K-LABEL: _$s8test_v7k7minMax3
329329
struct Ret {
330330
var min:Int

test/IRGen/abitypes_objc.swift

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -27,20 +27,20 @@ class Foo {
2727
// x86_64-macosx: define internal { <2 x float>, <2 x float> } @"$s8abitypes3FooC3bar{{[_0-9a-zA-Z]*}}FTo"(ptr %0, ptr %1) {{[#0-9]*}} {
2828
// x86_64-ios: define hidden swiftcc { float, float, float, float } @"$s8abitypes3FooC3bar{{[_0-9a-zA-Z]*}}F"(ptr swiftself %0) {{.*}} {
2929
// x86_64-ios: define internal { <2 x float>, <2 x float> } @"$s8abitypes3FooC3bar{{[_0-9a-zA-Z]*}}FTo"(ptr %0, ptr %1) {{[#0-9]*}} {
30-
// i386-ios: define hidden swiftcc void @"$s8abitypes3FooC3bar{{[_0-9a-zA-Z]*}}F"(ptr noalias captures(none) sret({{.*}}) %0, ptr swiftself %1) {{.*}} {
31-
// i386-ios: define internal void @"$s8abitypes3FooC3bar{{[_0-9a-zA-Z]*}}FTo"(ptr noalias captures(none) sret({{.*}}) %0, ptr %1, ptr %2) {{[#0-9]*}} {
30+
// i386-ios: define hidden swiftcc void @"$s8abitypes3FooC3bar{{[_0-9a-zA-Z]*}}F"(ptr noalias sret({{.*}}) captures(none) %0, ptr swiftself %1) {{.*}} {
31+
// i386-ios: define internal void @"$s8abitypes3FooC3bar{{[_0-9a-zA-Z]*}}FTo"(ptr noalias sret({{.*}}) captures(none) %0, ptr %1, ptr %2) {{[#0-9]*}} {
3232
// armv7-ios: define hidden swiftcc { float, float, float, float } @"$s8abitypes3FooC3bar{{[_0-9a-zA-Z]*}}F"(ptr swiftself %0) {{.*}} {
33-
// armv7-ios: define internal void @"$s8abitypes3FooC3bar{{[_0-9a-zA-Z]*}}FTo"(ptr noalias captures(none) sret({{.*}}) %0, ptr %1, ptr %2) {{[#0-9]*}} {
33+
// armv7-ios: define internal void @"$s8abitypes3FooC3bar{{[_0-9a-zA-Z]*}}FTo"(ptr noalias sret({{.*}}) captures(none) %0, ptr %1, ptr %2) {{[#0-9]*}} {
3434
// armv7s-ios: define hidden swiftcc { float, float, float, float } @"$s8abitypes3FooC3bar{{[_0-9a-zA-Z]*}}F"(ptr swiftself %0) {{.*}} {
35-
// armv7s-ios: define internal void @"$s8abitypes3FooC3bar{{[_0-9a-zA-Z]*}}FTo"(ptr noalias captures(none) sret({{.*}}) %0, ptr %1, ptr %2) {{[#0-9]*}} {
35+
// armv7s-ios: define internal void @"$s8abitypes3FooC3bar{{[_0-9a-zA-Z]*}}FTo"(ptr noalias sret({{.*}}) captures(none) %0, ptr %1, ptr %2) {{[#0-9]*}} {
3636
// arm64-ios: define hidden swiftcc { float, float, float, float } @"$s8abitypes3FooC3bar{{[_0-9a-zA-Z]*}}F"(ptr swiftself %0) {{.*}} {
3737
// arm64-ios: define internal [[ARM64_MYRECT]] @"$s8abitypes3FooC3bar{{[_0-9a-zA-Z]*}}FTo"(ptr %0, ptr %1) {{[#0-9]*}} {
3838
// x86_64-tvos: define hidden swiftcc { float, float, float, float } @"$s8abitypes3FooC3bar{{[_0-9a-zA-Z]*}}F"(ptr swiftself %0) {{.*}} {
3939
// x86_64-tvos: define internal { <2 x float>, <2 x float> } @"$s8abitypes3FooC3bar{{[_0-9a-zA-Z]*}}FTo"(ptr %0, ptr %1) {{[#0-9]*}} {
4040
// arm64-tvos: define hidden swiftcc { float, float, float, float } @"$s8abitypes3FooC3bar{{[_0-9a-zA-Z]*}}F"(ptr swiftself %0) {{.*}} {
4141
// arm64-tvos: define internal [[ARM64_MYRECT]] @"$s8abitypes3FooC3bar{{[_0-9a-zA-Z]*}}FTo"(ptr %0, ptr %1) {{[#0-9]*}} {
42-
// i386-watchos: define hidden swiftcc void @"$s8abitypes3FooC3bar{{[_0-9a-zA-Z]*}}F"(ptr noalias captures(none) sret({{.*}}) %0, ptr swiftself %1) {{.*}} {
43-
// i386-watchos: define internal void @"$s8abitypes3FooC3bar{{[_0-9a-zA-Z]*}}FTo"(ptr noalias captures(none) sret({{.*}}) %0, ptr %1, ptr %2) {{[#0-9]*}} {
42+
// i386-watchos: define hidden swiftcc void @"$s8abitypes3FooC3bar{{[_0-9a-zA-Z]*}}F"(ptr noalias sret({{.*}}) captures(none) %0, ptr swiftself %1) {{.*}} {
43+
// i386-watchos: define internal void @"$s8abitypes3FooC3bar{{[_0-9a-zA-Z]*}}FTo"(ptr noalias sret({{.*}}) captures(none) %0, ptr %1, ptr %2) {{[#0-9]*}} {
4444
// armv7k-watchos: define hidden swiftcc { float, float, float, float } @"$s8abitypes3FooC3bar{{[_0-9a-zA-Z]*}}F"(ptr swiftself %0) {{.*}} {
4545
// armv7k-watchos: define internal [[ARMV7K_MYRECT]] @"$s8abitypes3FooC3bar{{[_0-9a-zA-Z]*}}FTo"(ptr %0, ptr %1) {{[#0-9]*}} {
4646
// armv64_32-watchos: define hidden swiftcc { float, float, float, float } @"$s8abitypes3FooC3bar{{[_0-9a-zA-Z]*}}F"(ptr swiftself %0) {{.*}} {
@@ -157,7 +157,7 @@ class Foo {
157157
// armv7-ios: define hidden swiftcc float @"$s8abitypes3FooC4barc{{[_0-9a-zA-Z]*}}F"(ptr %0, ptr swiftself %1) {{.*}} {
158158
// armv7-ios: [[RESULT:%.*]] = alloca [[RECTTYPE:%.*MyRect.*]], align 4
159159
// armv7-ios: load ptr, ptr @"\01L_selector(newRect)", align 4
160-
// armv7-ios: call void @objc_msgSend_stret(ptr noalias captures(none) sret({{.*}}) %call.aggresult
160+
// armv7-ios: call void @objc_msgSend_stret(ptr noalias sret({{.*}}) captures(none) %call.aggresult
161161
// armv7-ios: [[GEP1:%.*]] = getelementptr inbounds [[RECTTYPE]], ptr [[RESULT]], i32 0, i32 1
162162
// armv7-ios: [[GEP2:%.*]] = getelementptr inbounds {{.*}}, ptr [[GEP1]], i32 0, i32 0
163163
// armv7-ios: [[RETVAL:%.*]] = load float, ptr [[GEP2]], align 4
@@ -167,7 +167,7 @@ class Foo {
167167
// armv7s-ios: define hidden swiftcc float @"$s8abitypes3FooC4barc{{[_0-9a-zA-Z]*}}F"(ptr %0, ptr swiftself %1) {{.*}} {
168168
// armv7s-ios: [[RESULT:%.*]] = alloca [[RECTTYPE:%.*MyRect.*]], align 4
169169
// armv7s-ios: load ptr, ptr @"\01L_selector(newRect)", align 4
170-
// armv7s-ios: call void @objc_msgSend_stret(ptr noalias captures(none) sret({{.*}}) %call.aggresult
170+
// armv7s-ios: call void @objc_msgSend_stret(ptr noalias sret({{.*}}) captures(none) %call.aggresult
171171
// armv7s-ios: [[GEP1:%.*]] = getelementptr inbounds [[RECTTYPE]], ptr [[RESULT]], i32 0, i32 1
172172
// armv7s-ios: [[GEP2:%.*]] = getelementptr inbounds {{.*}}, ptr [[GEP1]], i32 0, i32 0
173173
// armv7s-ios: [[RETVAL:%.*]] = load float, ptr [[GEP2]], align 4
@@ -185,7 +185,7 @@ class Foo {
185185
}
186186

187187
// x86_64-macosx: define hidden swiftcc { double, double, double } @"$s8abitypes3FooC3baz{{[_0-9a-zA-Z]*}}F"(ptr swiftself %0) {{.*}} {
188-
// x86_64-macosx: define internal void @"$s8abitypes3FooC3baz{{[_0-9a-zA-Z]*}}FTo"(ptr noalias captures(none) sret({{.*}}) %0, ptr %1, ptr %2) {{[#0-9]*}} {
188+
// x86_64-macosx: define internal void @"$s8abitypes3FooC3baz{{[_0-9a-zA-Z]*}}FTo"(ptr noalias sret({{.*}}) captures(none) %0, ptr %1, ptr %2) {{[#0-9]*}} {
189189
@objc dynamic func baz() -> Trio {
190190
return Trio(i: 1.0, j: 2.0, k: 3.0)
191191
}
@@ -480,12 +480,12 @@ class Foo {
480480
return g.invert(b)
481481
}
482482

483-
// x86_64-macosx: define hidden swiftcc void @"$s8abitypes3FooC10throwsTestyySbKF"(i1 %0, ptr swiftself %1, ptr noalias captures(none) swifterror dereferenceable(8) %2) {{.*}} {
483+
// x86_64-macosx: define hidden swiftcc void @"$s8abitypes3FooC10throwsTestyySbKF"(i1 %0, ptr swiftself %1, ptr noalias swifterror captures(none) dereferenceable(8) %2) {{.*}} {
484484
// x86_64-macosx: [[SEL:%[0-9]+]] = load ptr, ptr @"\01L_selector(negateThrowing:error:)", align 8
485485
// x86_64-macosx: call signext i8 @objc_msgSend(ptr {{%[0-9]+}}, ptr [[SEL]], i8 signext {{%[0-9]+}}, ptr {{%[0-9]+}})
486486
// x86_64-macosx: }
487487

488-
// x86_64-ios: define hidden swiftcc void @"$s8abitypes3FooC10throwsTestyySbKF"(i1 %0, ptr swiftself %1, ptr noalias captures(none) swifterror dereferenceable(8) %2) {{.*}} {
488+
// x86_64-ios: define hidden swiftcc void @"$s8abitypes3FooC10throwsTestyySbKF"(i1 %0, ptr swiftself %1, ptr noalias swifterror captures(none) dereferenceable(8) %2) {{.*}} {
489489
// x86_64-ios: [[SEL:%[0-9]+]] = load ptr, ptr @"\01L_selector(negateThrowing:error:)", align 8
490490
// x86_64-ios: call zeroext i1 @objc_msgSend(ptr {{%[0-9]+}}, ptr [[SEL]], i1 zeroext {{%[0-9]+}}, ptr {{%[0-9]+}})
491491
// x86_64-ios: }
@@ -547,18 +547,18 @@ class Foo {
547547
}
548548

549549
// arm64-ios: define hidden swiftcc { i64, i64, i64, i64 } @"$s8abitypes3FooC14callJustReturn{{[_0-9a-zA-Z]*}}F"(ptr %0, i64 %1, i64 %2, i64 %3, i64 %4, ptr swiftself %5) {{.*}} {
550-
// arm64-ios: define internal void @"$s8abitypes3FooC14callJustReturn{{[_0-9a-zA-Z]*}}FTo"(ptr noalias captures(none) sret({{.*}}) %0, ptr %1, ptr %2, ptr %3, ptr %4) {{[#0-9]*}} {
550+
// arm64-ios: define internal void @"$s8abitypes3FooC14callJustReturn{{[_0-9a-zA-Z]*}}FTo"(ptr noalias sret({{.*}}) captures(none) %0, ptr %1, ptr %2, ptr %3, ptr %4) {{[#0-9]*}} {
551551
//
552552
// arm64e-ios: define hidden swiftcc { i64, i64, i64, i64 } @"$s8abitypes3FooC14callJustReturn{{[_0-9a-zA-Z]*}}F"(ptr %0, i64 %1, i64 %2, i64 %3, i64 %4, ptr swiftself %5) {{.*}} {
553-
// arm64e-ios: define internal void @"$s8abitypes3FooC14callJustReturn{{[_0-9a-zA-Z]*}}FTo"(ptr noalias captures(none) sret({{.*}}) %0, ptr %1, ptr %2, ptr %3, ptr %4) {{.*}} {
553+
// arm64e-ios: define internal void @"$s8abitypes3FooC14callJustReturn{{[_0-9a-zA-Z]*}}FTo"(ptr noalias sret({{.*}}) captures(none) %0, ptr %1, ptr %2, ptr %3, ptr %4) {{.*}} {
554554
//
555555
// arm64-tvos: define hidden swiftcc { i64, i64, i64, i64 } @"$s8abitypes3FooC14callJustReturn{{[_0-9a-zA-Z]*}}F"(ptr %0, i64 %1, i64 %2, i64 %3, i64 %4, ptr swiftself %5) {{.*}} {
556-
// arm64-tvos: define internal void @"$s8abitypes3FooC14callJustReturn{{[_0-9a-zA-Z]*}}FTo"(ptr noalias captures(none) sret({{.*}}) %0, ptr %1, ptr %2, ptr %3, ptr %4) {{[#0-9]*}} {
556+
// arm64-tvos: define internal void @"$s8abitypes3FooC14callJustReturn{{[_0-9a-zA-Z]*}}FTo"(ptr noalias sret({{.*}})captures(none) %0, ptr %1, ptr %2, ptr %3, ptr %4) {{[#0-9]*}} {
557557
// arm64-macosx: define hidden swiftcc { i64, i64, i64, i64 } @"$s8abitypes3FooC14callJustReturn{{[_0-9a-zA-Z]*}}F"(ptr %0, i64 %1, i64 %2, i64 %3, i64 %4, ptr swiftself %5) {{.*}} {
558-
// arm64-macosx: define internal void @"$s8abitypes3FooC14callJustReturn{{[_0-9a-zA-Z]*}}FTo"(ptr noalias captures(none) sret({{.*}}) %0, ptr %1, ptr %2, ptr %3, ptr %4) {{.*}} {
558+
// arm64-macosx: define internal void @"$s8abitypes3FooC14callJustReturn{{[_0-9a-zA-Z]*}}FTo"(ptr noalias sret({{.*}}) captures(none) %0, ptr %1, ptr %2, ptr %3, ptr %4) {{.*}} {
559559
//
560560
// arm64-watchos: define hidden swiftcc { i64, i64, i64, i64 } @"$s8abitypes3FooC14callJustReturn{{[_0-9a-zA-Z]*}}F"(ptr %0, i64 %1, i64 %2, i64 %3, i64 %4, ptr swiftself %5) {{.*}} {
561-
// arm64-watchos: define internal void @"$s8abitypes3FooC14callJustReturn{{[_0-9a-zA-Z]*}}FTo"(ptr noalias captures(none) sret({{.*}}) %0, ptr %1, ptr %2, ptr %3, ptr %4) {{[#0-9]*}} {
561+
// arm64-watchos: define internal void @"$s8abitypes3FooC14callJustReturn{{[_0-9a-zA-Z]*}}FTo"(ptr noalias sret({{.*}}) captures(none) %0, ptr %1, ptr %2, ptr %3, ptr %4) {{[#0-9]*}} {
562562
@objc dynamic func callJustReturn(_ r: StructReturns, with v: BigStruct) -> BigStruct {
563563
return r.justReturn(v)
564564
}

0 commit comments

Comments
 (0)