Skip to content

Commit 12f6ec9

Browse files
committed
[rebranch][test] IRGen: Adjust FileCheck matches for new LLVM parameter attribute
The `initializes` parameter attribute was introduced in 5ece35df8586d0cb8c104a9f44eaae771de025f5 (llvm-project). The lowered function bodies indicate that the attribute is correct. Match the attribute using a wildcard regex because it appears only in -O mode and is not relevant to these tests.
1 parent d4c27f5 commit 12f6ec9

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

test/IRGen/non_fixed_return.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,14 +55,14 @@ func create<T>(_ t: T) -> C<T> {
5555
// We use opaque storage types because LLVM performs type based analysis based
5656
// on the sret storage type which goes wrong with non fixed types.
5757

58-
// CHECK-LABEL: define hidden swiftcc void @"$s16non_fixed_return1CVACyxGycfC"(ptr noalias sret(%swift.opaque) %0
58+
// CHECK-LABEL: define hidden swiftcc void @"$s16non_fixed_return1CVACyxGycfC"(ptr noalias sret(%swift.opaque){{.*}} %0
5959

6060
// CHECK-LABEL: define hidden swiftcc void @"$s16non_fixed_return6createyAA1CVyxGxlF"(ptr noalias sret(%swift.opaque) %0, ptr noalias %1, ptr %T)
6161
// CHECK: call swiftcc void @"$s16non_fixed_return1CVACyxGycfC"(ptr noalias sret(%swift.opaque) %0
6262
// CHECK: ret void
6363

6464
// Make sure we don't loose the stores for the optional UInt32? in optimize mode.
65-
// OPT-LABEL: define hidden swiftcc void @"$s16non_fixed_return1CVACyxGycfC"(ptr noalias sret(%swift.opaque) %0
65+
// OPT-LABEL: define hidden swiftcc void @"$s16non_fixed_return1CVACyxGycfC"(ptr noalias sret(%swift.opaque){{.*}} %0
6666
// OPT: store i32 0, ptr [[BASE:%[0-9]+]]
6767
// OPT: [[ADDR2:%.*]] = getelementptr inbounds nuw i8, ptr [[BASE]], i64 4
6868
// OPT: store i8 1, ptr [[ADDR2]]

test/IRGen/pre_specialize.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,12 +42,12 @@
4242
// specialized InternalThing.computedX.getter
4343
// CHECK-A-DAG: define{{( dllexport)?}}{{( protected)?}} swiftcc [[INT]] @"$s1A13InternalThingV9computedXxvgSi_Ts5"([[INT]]{{( returned)?}} %0)
4444
// specialized InternalThing.computedX.setter
45-
// CHECK-A-DAG: define{{( dllexport)?}}{{( protected)?}} swiftcc void @"$s1A13InternalThingV9computedXxvsSi_Ts5"([[INT]] %0, ptr swiftself {{(writeonly )?}}captures(none) dereferenceable({{(4|8)}}) %1)
45+
// CHECK-A-DAG: define{{( dllexport)?}}{{( protected)?}} swiftcc void @"$s1A13InternalThingV9computedXxvsSi_Ts5"([[INT]] %0, ptr swiftself {{(writeonly )?}}captures(none) dereferenceable({{(4|8)}}){{.*}} %1)
4646

4747
// specialized InternalThing.subscript.getter
4848
// CHECK-A-DAG: define{{( dllexport)?}}{{( protected)?}} swiftcc [[INT]] @"$s1A13InternalThingVyxSicigSi_Ts5"([[INT]] %0, [[INT]]{{( returned)?}} %1)
4949
// specialized InternalThing.subscript.setter
50-
// CHECK-A-DAG: define{{( dllexport)?}}{{( protected)?}} swiftcc void @"$s1A13InternalThingVyxSicisSi_Ts5"([[INT]] %0, [[INT]] %1, ptr swiftself {{(writeonly )?}}captures(none) dereferenceable({{(4|8)}}) %2)
50+
// CHECK-A-DAG: define{{( dllexport)?}}{{( protected)?}} swiftcc void @"$s1A13InternalThingVyxSicisSi_Ts5"([[INT]] %0, [[INT]] %1, ptr swiftself {{(writeonly )?}}captures(none) dereferenceable({{(4|8)}}){{.*}} %2)
5151

5252
// specialized InternalRef.compute()
5353
// CHECK-A-FRAG-DAG: define{{( dllexport)?}}{{( protected)?}} swiftcc [[INT:(i64|i32)]] @"$s1A11InternalRefC7computexyFAA09ResilientA10BoxedThingVySiG_Ts5"

0 commit comments

Comments
 (0)