Skip to content

Commit 314d524

Browse files
committed
[test] IRGen: Adjust FileCheck patterns for new initializes attribute in upstream LLVM
The parameter attribute was introduced in 5ece35df8586d0cb8c104a9f44eaae771de025f5 (llvm-project) and is expected here according to the lowered function bodies. Match it using a wildcard regex, since it is not relevant to these tests. This is intended to reduce future conflicts with rebranch.
1 parent d57f78e commit 314d524

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
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{{.*}} i8, ptr [[BASE]], i64 4
6868
// OPT: store i8 1, ptr [[ADDR2]]

test/IRGen/pre_specialize.swift

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,12 +42,11 @@
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 nocapture swiftself {{(writeonly )?}}dereferenceable({{(4|8)}}) %1)
46-
45+
// CHECK-A-DAG: define{{( dllexport)?}}{{( protected)?}} swiftcc void @"$s1A13InternalThingV9computedXxvsSi_Ts5"([[INT]] %0, ptr nocapture swiftself {{(writeonly )?}}dereferenceable({{(4|8)}}){{.*}} %1)
4746
// specialized InternalThing.subscript.getter
4847
// CHECK-A-DAG: define{{( dllexport)?}}{{( protected)?}} swiftcc [[INT]] @"$s1A13InternalThingVyxSicigSi_Ts5"([[INT]] %0, [[INT]]{{( returned)?}} %1)
4948
// specialized InternalThing.subscript.setter
50-
// CHECK-A-DAG: define{{( dllexport)?}}{{( protected)?}} swiftcc void @"$s1A13InternalThingVyxSicisSi_Ts5"([[INT]] %0, [[INT]] %1, ptr nocapture swiftself {{(writeonly )?}}dereferenceable({{(4|8)}}) %2)
49+
// CHECK-A-DAG: define{{( dllexport)?}}{{( protected)?}} swiftcc void @"$s1A13InternalThingVyxSicisSi_Ts5"([[INT]] %0, [[INT]] %1, ptr nocapture swiftself {{(writeonly )?}}dereferenceable({{(4|8)}}){{.*}} %2)
5150

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

0 commit comments

Comments
 (0)