Skip to content

Commit a44b36c

Browse files
committed
Fix abitypes.swift, class_update_callback_without_fixed_layout.sil,dynamic_self_metadata.swift
1 parent 599e82c commit a44b36c

File tree

3 files changed

+10
-17
lines changed

3 files changed

+10
-17
lines changed

test/IRGen/abitypes.swift

Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -145,10 +145,9 @@ class Foo {
145145
// x86_64 returns an HA of four floats directly in two <2 x float>
146146
// x86_64-macosx: define hidden swiftcc float @"$s8abitypes3FooC4barc{{[_0-9a-zA-Z]*}}F"(ptr %0, ptr swiftself %1) {{.*}} {
147147
// x86_64-macosx: load ptr, ptr @"\01L_selector(newRect)", align 8
148-
// x86_64-macosx: [[RESULT:%.*]] = call { <2 x float>, <2 x float> } bitcast (ptr @objc_msgSend
148+
// x86_64-macosx: [[RESULT:%.*]] = call { <2 x float>, <2 x float> } @objc_msgSend
149149
// x86_64-macosx: store { <2 x float>, <2 x float> } [[RESULT]]
150-
// x86_64-macosx: [[CAST:%.*]] = bitcast ptr
151-
// x86_64-macosx: load { float, float, float, float }, ptr [[CAST]]
150+
// x86_64-macosx: load { float, float, float, float }, ptr
152151
// x86_64-macosx: ret float
153152
//
154153
// armv7 returns an HA of four floats indirectly
@@ -174,7 +173,7 @@ class Foo {
174173
// armv7k returns an HA of four floats directly
175174
// armv7k-watchos: define hidden swiftcc float @"$s8abitypes3FooC4barc{{[_0-9a-zA-Z]*}}F"(ptr %0, ptr swiftself %1) {{.*}} {
176175
// armv7k-watchos: load ptr, ptr @"\01L_selector(newRect)", align 4
177-
// armv7k-watchos: [[RESULT:%.*]] = call [[ARMV7K_MYRECT]] bitcast (ptr @objc_msgSend
176+
// armv7k-watchos: [[RESULT:%.*]] = call [[ARMV7K_MYRECT]] @objc_msgSend
178177
// armv7k-watchos: store [[ARMV7K_MYRECT]] [[RESULT]]
179178
// armv7k-watchos: [[CAST:%.*]] = bitcast ptr
180179
// armv7k-watchos: load { float, float, float, float }, ptr [[CAST]]
@@ -191,7 +190,6 @@ class Foo {
191190

192191
// x86_64-macosx: define hidden swiftcc double @"$s8abitypes3FooC4bazc{{[_0-9a-zA-Z]*}}F"(ptr %0, ptr swiftself %1) {{.*}} {
193192
// x86_64-macosx: load ptr, ptr @"\01L_selector(newTrio)", align 8
194-
// x86_64-macosx: [[CAST:%[0-9]+]] = bitcast ptr %0
195193
// x86_64-macosx: call void @objc_msgSend_stret
196194
func bazc(_ p: StructReturns) -> Double {
197195
return p.newTrio().j
@@ -215,13 +213,11 @@ class Foo {
215213

216214
// x86_64-macosx: define hidden swiftcc i64 @"$s8abitypes3FooC9getnested{{[_0-9a-zA-Z]*}}F"(ptr %0, ptr swiftself %1) {{.*}} {
217215
// x86_64-macosx: call i64 @objc_msgSend
218-
// x86_64-macosx: bitcast
219216
// x86_64-macosx: call void @llvm.lifetime.start
220217
// x86_64-macosx: store i32 {{.*}}
221218
// x86_64-macosx: store i32 {{.*}}
222-
// x86_64-macosx: [[T0:%.*]] = getelementptr inbounds { i64 }, { i64 }
219+
// x86_64-macosx: [[T0:%.*]] = getelementptr inbounds { i64 }, ptr
223220
// x86_64-macosx: load i64, ptr [[T0]], align 8
224-
// x86_64-macosx: bitcast
225221
// x86_64-macosx: call void @llvm.lifetime.end
226222
// x86_64-macosx: ret i64
227223
func getnested(_ p: StructReturns) -> NestedInts {
@@ -237,17 +233,15 @@ class Foo {
237233
}
238234

239235
// x86_64-macosx: define internal ptr @"$s8abitypes3FooC9copyProto{{[_0-9a-zA-Z]*}}FTo"(ptr %0, ptr %1, ptr %2) {{[#0-9]*}} {
240-
// x86_64-macosx: [[VALUE:%[0-9]+]] = call swiftcc [[TYPE:%.*]] @"$s8abitypes3FooC9copyProto{{[_0-9a-zA-Z]*}}F"
241-
// x86_64-macosx: [[RESULT:%[0-9]+]] = bitcast [[TYPE:%.*]] [[VALUE]] to ptr
242-
// x86_64-macosx: ret ptr [[RESULT]]
236+
// x86_64-macosx: [[VALUE:%[0-9]+]] = call swiftcc ptr @"$s8abitypes3FooC9copyProto{{[_0-9a-zA-Z]*}}F"
237+
// x86_64-macosx: ret ptr [[VALUE]]
243238
@objc dynamic func copyProto(_ a: AnyObject) -> AnyObject {
244239
return a
245240
}
246241

247242
// x86_64-macosx: define internal ptr @"$s8abitypes3FooC13copyProtoComp{{[_0-9a-zA-Z]*}}FTo"(ptr %0, ptr %1, ptr %2) {{[#0-9]*}} {
248-
// x86_64-macosx: [[VALUE:%[0-9]+]] = call swiftcc [[TYPE:%.*]] @"$s8abitypes3FooC13copyProtoComp{{[_0-9a-zA-Z]*}}F"
249-
// x86_64-macosx: [[RESULT:%[0-9]+]] = bitcast [[TYPE]] [[VALUE]] to ptr
250-
// x86_64-macosx: ret ptr [[RESULT]]
243+
// x86_64-macosx: [[VALUE:%[0-9]+]] = call swiftcc ptr @"$s8abitypes3FooC13copyProtoComp{{[_0-9a-zA-Z]*}}F"
244+
// x86_64-macosx: ret ptr [[VALUE]]
251245
@objc dynamic func copyProtoComp(_ a: P1 & P2) -> P1 & P2 {
252246
return a
253247
}

test/IRGen/class_update_callback_without_fixed_layout.sil

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// RUN: %empty-directory(%t)
22
// RUN: %target-swift-frontend -emit-module -enable-library-evolution -emit-module-path=%t/resilient_struct.swiftmodule -module-name=resilient_struct %S/../Inputs/resilient_struct.swift
33

4-
// RUN: %target-swift-frontend %use_no_opaque_pointers -I %t -emit-ir -enable-library-evolution %s -target %target-pre-stable-abi-triple | %FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-OLD --check-prefix=CHECK-%target-ptrsize --check-prefix=CHECK-OLD-%target-ptrsize -DINT=i%target-ptrsize
4+
// RUN: %target-swift-frontend -I %t -emit-ir -enable-library-evolution %s -target %target-pre-stable-abi-triple | %FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-OLD --check-prefix=CHECK-%target-ptrsize --check-prefix=CHECK-OLD-%target-ptrsize -DINT=i%target-ptrsize
55
// RUN: %target-swift-frontend -I %t -emit-ir -enable-library-evolution %s -target %target-pre-stable-abi-triple
66
// RUN: %target-swift-frontend -I %t -emit-ir -enable-library-evolution -O %s -target %target-pre-stable-abi-triple
77

test/IRGen/dynamic_self_metadata.swift

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
// RUN: %target-swift-frontend %use_no_opaque_pointers -disable-generic-metadata-prespecialization %s -emit-ir -parse-as-library | %FileCheck %s
2-
// RUN: %target-swift-frontend -disable-generic-metadata-prespecialization %s -emit-ir -parse-as-library
1+
// RUN: %target-swift-frontend -disable-generic-metadata-prespecialization %s -emit-ir -parse-as-library | %FileCheck %s
32

43
// UNSUPPORTED: OS=windows-msvc
54
// REQUIRES: CPU=x86_64

0 commit comments

Comments
 (0)