[Tests] Fix IRGen tests for new LLVM version

rdar://132124067

LLVM code gen has changed, so we need to adjust the expected output in our tests accordingly
This commit is contained in:
Dario Rexin
2024-07-23 11:23:32 -07:00
parent 4967c5c6a7
commit 38bd7f436e
10 changed files with 117 additions and 61 deletions

View File

@@ -4,7 +4,7 @@ sil_stage canonical
import Swift
import Builtin
// CHECK-LABEL: define{{.*}} swiftcc i64 @test_assume(i64 %0)
// CHECK-LABEL: define{{.*}} swiftcc{{.*}} i64 @test_assume(i64 %0)
// CHECK: [[COND:%.*]] = icmp sgt i64 %0, -1
// CHECK: tail call void @llvm.assume(i1 [[COND]])
// CHECK: [[RES:%.*]] = lshr i64 %0, 6

View File

@@ -18,10 +18,12 @@ func yuck() -> Int32 {
// CHECK: poison
}
// CHECK: define{{.*}} swiftcc{{.*}} i32 @"$s14builtin_freeze3yums5Int32VyF"()
func yum() -> Int32 {
fptosiWithFreeze(0x1.0p32)
// CHECK-NOT: poison
}
// CHECK: }
func fptosi(_ x: SIMD2<Float>) -> SIMD2<Int32> {
let maybePoison = Builtin.fptosi_Vec2xFPIEEE32_Vec2xInt32(x._storage._value)

View File

@@ -43,59 +43,85 @@ public func testGlobalFunctions() {
// --- function(with:) ---
// CHECK: define linkonce_odr hidden i1 @"$s17has_symbol_helper8function4withySi_tFTwS"()
// CHECK: ret i1 icmp ne (ptr @"$s17has_symbol_helper8function4withySi_tF", ptr null)
// CHECK: [[RES:%.*]] = icmp ne ptr @"$s17has_symbol_helper8function4withySi_tF", null
// CHECK: ret i1 [[RES]]
// --- throwingFunc() ---
// CHECK: define linkonce_odr hidden i1 @"$s17has_symbol_helper12throwingFuncyyKFTwS"()
// CHECK: ret i1 icmp ne (ptr @"$s17has_symbol_helper12throwingFuncyyKF", ptr null)
// CHECK: [[RES:%.*]] = icmp ne ptr @"$s17has_symbol_helper12throwingFuncyyKF", null
// CHECK: ret i1 [[RES]]
// --- genericFunc(_:) ---
// CHECK: define linkonce_odr hidden i1 @"$s17has_symbol_helper11genericFuncyyxAA1PRzlFTwS"()
// CHECK: ret i1 icmp ne (ptr @"$s17has_symbol_helper11genericFuncyyxAA1PRzlF", ptr null)
// CHECK: [[RES:%.*]] = icmp ne ptr @"$s17has_symbol_helper11genericFuncyyxAA1PRzlF", null
// CHECK: ret i1 [[RES]]
// --- funcWithOpaqueResult() ---
// CHECK: define linkonce_odr hidden i1 @"$s17has_symbol_helper20funcWithOpaqueResultQryFTwS"()
// CHECK: %0 = and i1 icmp ne (ptr @"$s17has_symbol_helper20funcWithOpaqueResultQryFQOMQ", ptr null), icmp ne (ptr @"$s17has_symbol_helper20funcWithOpaqueResultQryF", ptr null)
// CHECK: ret i1 %0
// CHECK: [[V0:%.*]] = icmp ne ptr @"$s17has_symbol_helper20funcWithOpaqueResultQryFQOMQ", null
// CHECK: [[V1:%.*]] = icmp ne ptr @"$s17has_symbol_helper20funcWithOpaqueResultQryF", null
// CHECK: [[RES:%.*]] = and i1 [[V0]], [[V1]]
// CHECK: ret i1 [[RES]]
// --- cdeclFunc() ---
// CHECK: define linkonce_odr hidden i1 @"$s17has_symbol_helper9cdeclFuncyyFTwS"()
// CHECK: %0 = and i1 icmp ne (ptr @"$s17has_symbol_helper9cdeclFuncyyF", ptr null), icmp ne (ptr @cdecl_func, ptr null)
// CHECK: ret i1 %0
// CHECK: [[V0:%.*]] = icmp ne ptr @"$s17has_symbol_helper9cdeclFuncyyF", null
// CHECK: [[V1:%.*]] = icmp ne ptr @cdecl_func, null
// CHECK: [[RES:%.*]] = and i1 [[V0]], [[V1]]
// CHECK: ret i1 [[RES]]
// --- forwardDeclaredFunc() ---
// CHECK: define linkonce_odr hidden i1 @"$s17has_symbol_helper19forwardDeclaredFuncyyFTwS"()
// CHECK: ret i1 icmp ne (ptr @forward_declared_func, ptr null)
// CHECK: [[RES:%.*]] = icmp ne ptr @forward_declared_func, null
// CHECK: ret i1 [[RES]]
// --- dynamicFunc() ---
// CHECK: define linkonce_odr hidden i1 @"$s17has_symbol_helper11dynamicFuncyyFTwS"()
// CHECK: %0 = and i1 icmp ne (ptr @"$s17has_symbol_helper11dynamicFuncyyF", ptr null), icmp ne (ptr @"$s17has_symbol_helper11dynamicFuncyyFTX", ptr null)
// CHECK: %1 = and i1 %0, icmp ne (ptr @"$s17has_symbol_helper11dynamicFuncyyFTx", ptr null)
// CHECK: ret i1 %1
// CHECK: [[V0:%.*]] = icmp ne ptr @"$s17has_symbol_helper11dynamicFuncyyF", null
// CHECK: [[V1:%.*]] = icmp ne ptr @"$s17has_symbol_helper11dynamicFuncyyFTX", null
// CHECK: [[V2:%.*]] = and i1 [[V0]], [[V1]]
// CHECK: [[V3:%.*]] = icmp ne ptr @"$s17has_symbol_helper11dynamicFuncyyFTx", null
// CHECK: [[RES:%.*]] = and i1 [[V2]], [[V3]]
// CHECK: ret i1 [[RES]]
// --- replacementFunc() ---
// CHECK: define linkonce_odr hidden i1 @"$s17has_symbol_helper15replacementFuncyyFTwS"()
// CHECK: %0 = and i1 icmp ne (ptr @"$s17has_symbol_helper15replacementFuncyyF", ptr null), icmp ne (ptr @"$s17has_symbol_helper15replacementFuncyyFTX", ptr null)
// CHECK: ret i1 %0
// CHECK: [[V0:%.*]] = icmp ne ptr @"$s17has_symbol_helper15replacementFuncyyF", null
// CHECK: [[V1:%.*]] = icmp ne ptr @"$s17has_symbol_helper15replacementFuncyyFTX", null
// CHECK: [[RES:%.*]] = and i1 [[V0]], [[V1]]
// CHECK: ret i1 [[RES]]
// --- dynamicFuncOpaqueResult() ---
// CHECK: define linkonce_odr hidden i1 @"$s17has_symbol_helper23dynamicFuncOpaqueResultQryFTwS"()
// CHECK: %0 = and i1 icmp ne (ptr @"$s17has_symbol_helper23dynamicFuncOpaqueResultQryFQOMQ", ptr null), icmp ne (ptr @"$s17has_symbol_helper23dynamicFuncOpaqueResultQryFQOMg", ptr null)
// CHECK: %1 = and i1 %0, icmp ne (ptr @"$s17has_symbol_helper23dynamicFuncOpaqueResultQryFQOMh", ptr null)
// CHECK: %2 = and i1 %1, icmp ne (ptr @"$s17has_symbol_helper23dynamicFuncOpaqueResultQryFQOMg", ptr null)
// CHECK: %3 = and i1 %2, icmp ne (ptr @"$s17has_symbol_helper23dynamicFuncOpaqueResultQryFQOMg", ptr null)
// CHECK: %4 = and i1 %3, icmp ne (ptr @"$s17has_symbol_helper23dynamicFuncOpaqueResultQryF", ptr null)
// CHECK: %5 = and i1 %4, icmp ne (ptr @"$s17has_symbol_helper23dynamicFuncOpaqueResultQryFTX", ptr null)
// CHECK: %6 = and i1 %5, icmp ne (ptr @"$s17has_symbol_helper23dynamicFuncOpaqueResultQryFTx", ptr null)
// CHECK: ret i1 %6
// CHECK: [[V0:%.*]] = icmp ne ptr @"$s17has_symbol_helper23dynamicFuncOpaqueResultQryFQOMQ", null
// CHECK: [[V1:%.*]] = icmp ne ptr @"$s17has_symbol_helper23dynamicFuncOpaqueResultQryFQOMg", null
// CHECK: [[V2:%.*]] = and i1 [[V0]], [[V1]]
// CHECK: [[V3:%.*]] = icmp ne ptr @"$s17has_symbol_helper23dynamicFuncOpaqueResultQryFQOMh", null
// CHECK: [[V4:%.*]] = and i1 [[V2]], [[V3]]
// CHECK: [[V5:%.*]] = icmp ne ptr @"$s17has_symbol_helper23dynamicFuncOpaqueResultQryFQOMg", null
// CHECK: [[V6:%.*]] = and i1 [[V4]], [[V5]]
// CHECK: [[V7:%.*]] = icmp ne ptr @"$s17has_symbol_helper23dynamicFuncOpaqueResultQryFQOMg", null
// CHECK: [[V8:%.*]] = and i1 [[V6]], [[V7]]
// CHECK: [[V9:%.*]] = icmp ne ptr @"$s17has_symbol_helper23dynamicFuncOpaqueResultQryF", null
// CHECK: [[V10:%.*]] = and i1 [[V8]], [[V9]]
// CHECK: [[V11:%.*]] = icmp ne ptr @"$s17has_symbol_helper23dynamicFuncOpaqueResultQryFTX", null
// CHECK: [[V12:%.*]] = and i1 [[V10]], [[V11]]
// CHECK: [[V13:%.*]] = icmp ne ptr @"$s17has_symbol_helper23dynamicFuncOpaqueResultQryFTx", null
// CHECK: [[RES:%.*]] = and i1 [[V12]], [[V13]]
// CHECK: ret i1 [[RES]]
// --- replacementFuncOpaqueResult() ---
// CHECK: define linkonce_odr hidden i1 @"$s17has_symbol_helper27replacementFuncOpaqueResultQryFTwS"()
// CHECK: %0 = and i1 icmp ne (ptr @"$s17has_symbol_helper27replacementFuncOpaqueResultQryFQOMQ", ptr null), icmp ne (ptr @"$s17has_symbol_helper27replacementFuncOpaqueResultQryFQOMg", ptr null)
// CHECK: %1 = and i1 %0, icmp ne (ptr @"$s17has_symbol_helper27replacementFuncOpaqueResultQryFQOMg", ptr null)
// CHECK: %2 = and i1 %1, icmp ne (ptr @"$s17has_symbol_helper27replacementFuncOpaqueResultQryF", ptr null)
// CHECK: %3 = and i1 %2, icmp ne (ptr @"$s17has_symbol_helper27replacementFuncOpaqueResultQryFTX", ptr null)
// CHECK: ret i1 %3
// CHECK: [[V0:%.*]] = icmp ne ptr @"$s17has_symbol_helper27replacementFuncOpaqueResultQryFQOMQ", null
// CHECK: [[V1:%.*]] = icmp ne ptr @"$s17has_symbol_helper27replacementFuncOpaqueResultQryFQOMg", null
// CHECK: [[V2:%.*]] = and i1 [[V0]], [[V1]]
// CHECK: [[V3:%.*]] = icmp ne ptr @"$s17has_symbol_helper27replacementFuncOpaqueResultQryFQOMg", null
// CHECK: [[V4:%.*]] = and i1 [[V2]], [[V3]]
// CHECK: [[V5:%.*]] = icmp ne ptr @"$s17has_symbol_helper27replacementFuncOpaqueResultQryF", null
// CHECK: [[V6:%.*]] = and i1 [[V4]], [[V5]]
// CHECK: [[V7:%.*]] = icmp ne ptr @"$s17has_symbol_helper27replacementFuncOpaqueResultQryFTX", null
// CHECK: [[RES:%.*]] = and i1 [[V6]], [[V7]]
// CHECK: ret i1 [[RES]]
public func testVars() {
// CHECK: %{{[0-9]+}} = call i1 @"$s17has_symbol_helper6globalSivpTwS"()
@@ -104,7 +130,8 @@ public func testVars() {
// --- global ---
// CHECK: define linkonce_odr hidden i1 @"$s17has_symbol_helper6globalSivpTwS"()
// CHECK: ret i1 icmp ne (ptr @"$s17has_symbol_helper6globalSivg", ptr null)
// CHECK: [[RES:%.*]] = icmp ne ptr @"$s17has_symbol_helper6globalSivg", null
// CHECK: ret i1 [[RES]]
public func testClass(_ c: C) {
// CHECK: %{{[0-9]+}} = call i1 @"$s17has_symbol_helper1CCACycfcTwS"()
@@ -116,13 +143,17 @@ public func testClass(_ c: C) {
// --- C.init() ---
// CHECK: define linkonce_odr hidden i1 @"$s17has_symbol_helper1CCACycfcTwS"()
// CHECK: %0 = and i1 icmp ne (ptr @"$s17has_symbol_helper1CCACycfc", ptr null), icmp ne (ptr @"$s17has_symbol_helper1CCACycfC", ptr null)
// CHECK: ret i1 %0
// CHECK: [[V0:%.*]] = icmp ne ptr @"$s17has_symbol_helper1CCACycfc", null
// CHECK: [[V1:%.*]] = icmp ne ptr @"$s17has_symbol_helper1CCACycfC", null
// CHECK: [[RES:%.*]] = and i1 [[V0]], [[V1]]
// CHECK: ret i1 [[RES]]
// --- C.method(with:) ---
// CHECK: define linkonce_odr hidden i1 @"$s17has_symbol_helper1CC6method4withySi_tFTwS"()
// CHECK: %0 = and i1 icmp ne (ptr @"$s17has_symbol_helper1CC6method4withySi_tFTj", ptr null), icmp ne (ptr @"$s17has_symbol_helper1CC6method4withySi_tFTq", ptr null)
// CHECK: ret i1 %0
// CHECK: [[V0:%.*]] = icmp ne ptr @"$s17has_symbol_helper1CC6method4withySi_tFTj", null
// CHECK: [[V1:%.*]] = icmp ne ptr @"$s17has_symbol_helper1CC6method4withySi_tFTq", null
// CHECK: [[RES:%.*]] = and i1 [[V0]], [[V1]]
// CHECK: ret i1 [[RES]]
public func testStruct(_ s: S) {
// CHECK: %{{[0-9]+}} = call i1 @"$s17has_symbol_helper1SV6memberSivpTwS"()
@@ -134,14 +165,19 @@ public func testStruct(_ s: S) {
// --- S.member ---
// CHECK: define linkonce_odr hidden i1 @"$s17has_symbol_helper1SV6memberSivpTwS"()
// CHECK: %0 = and i1 icmp ne (ptr @"$s17has_symbol_helper1SV6memberSivpMV", ptr null), icmp ne (ptr @"$s17has_symbol_helper1SV6memberSivg", ptr null)
// CHECK: %1 = and i1 %0, icmp ne (ptr @"$s17has_symbol_helper1SV6memberSivs", ptr null)
// CHECK: %2 = and i1 %1, icmp ne (ptr @"$s17has_symbol_helper1SV6memberSivM", ptr null)
// CHECK: ret i1 %2
// CHECK: [[V0:%.*]] = icmp ne ptr @"$s17has_symbol_helper1SV6memberSivpMV", null
// CHECK: [[V1:%.*]] = icmp ne ptr @"$s17has_symbol_helper1SV6memberSivg", null
// CHECK: [[V2:%.*]] = and i1 [[V0]], [[V1]]
// CHECK: [[V3:%.*]] = icmp ne ptr @"$s17has_symbol_helper1SV6memberSivs", null
// CHECK: [[V4:%.*]] = and i1 [[V2]], [[V3]]
// CHECK: [[V5:%.*]] = icmp ne ptr @"$s17has_symbol_helper1SV6memberSivM", null
// CHECK: [[RES:%.*]] = and i1 [[V4]], [[V5]]
// CHECK: ret i1 [[RES]]
// --- S.method(with:) ---
// CHECK: define linkonce_odr hidden i1 @"$s17has_symbol_helper1SV6method4withySi_tFTwS"()
// CHECK: ret i1 icmp ne (ptr @"$s17has_symbol_helper1SV6method4withySi_tF", ptr null)
// CHECK: [[RES:%.*]] = icmp ne ptr @"$s17has_symbol_helper1SV6method4withySi_tF", null
// CHECK: ret i1 [[RES]]
public func testEnum(_ e: E) {
// CHECK: %{{[0-9]+}} = call i1 @"$s17has_symbol_helper1EO9basicCaseyA2CmFTwS"()
@@ -153,11 +189,13 @@ public func testEnum(_ e: E) {
// --- E.basicCase ---
// CHECK: define linkonce_odr hidden i1 @"$s17has_symbol_helper1EO9basicCaseyA2CmFTwS"()
// CHECK: ret i1 icmp ne (ptr @"$s17has_symbol_helper1EO9basicCaseyA2CmFWC", ptr null)
// CHECK: [[RES:%.*]] = icmp ne ptr @"$s17has_symbol_helper1EO9basicCaseyA2CmFWC", null
// CHECK: ret i1 [[RES]]
// --- E.payloadCase(_:) ---
// CHECK: define linkonce_odr hidden i1 @"$s17has_symbol_helper1EO11payloadCaseyAcA1SVcACmFTwS"()
// CHECK: ret i1 icmp ne (ptr @"$s17has_symbol_helper1EO11payloadCaseyAcA1SVcACmFWC", ptr null)
// CHECK: [[RES:%.*]] = icmp ne ptr @"$s17has_symbol_helper1EO11payloadCaseyAcA1SVcACmFWC", null
// CHECK: ret i1 [[RES]]
public func testOpaqueParameter<T: P>(_ p: T) {
// CHECK: %{{[0-9]+}} = call i1 @"$s17has_symbol_helper1PP11requirementyyFTwS"()
@@ -169,11 +207,13 @@ public func testOpaqueParameter<T: P>(_ p: T) {
// --- P.requirement() ---
// CHECK: define linkonce_odr hidden i1 @"$s17has_symbol_helper1PP11requirementyyFTwS"()
// CHECK: ret i1 icmp ne (ptr @"$s17has_symbol_helper1PP11requirementyyF", ptr null)
// CHECK: [[RES:%.*]] = icmp ne ptr @"$s17has_symbol_helper1PP11requirementyyF", null
// CHECK: ret i1 [[RES]]
// --- P.requirementWithDefaultImpl() ---
// CHECK: define linkonce_odr hidden i1 @"$s17has_symbol_helper1PP26requirementWithDefaultImplyyFTwS"()
// CHECK: ret i1 icmp ne (ptr @"$s17has_symbol_helper1PP26requirementWithDefaultImplyyF", ptr null)
// CHECK: [[RES:%.*]] = icmp ne ptr @"$s17has_symbol_helper1PP26requirementWithDefaultImplyyF", null
// CHECK: ret i1 [[RES]]
public func testExistentialParameter(_ p: any P) {
// CHECK: %{{[0-9]+}} = call i1 @"$s17has_symbol_helper1PP11requirementyyFTwS"()
@@ -190,6 +230,9 @@ public func testMetatypes() {
// --- S.self ---
// CHECK: define linkonce_odr hidden i1 @"$s17has_symbol_helper1SVTwS"()
// CHECK: %0 = and i1 icmp ne (ptr @"$s17has_symbol_helper1SVMn", ptr null), icmp ne (ptr @"$s17has_symbol_helper1SVN", ptr null)
// CHECK: %1 = and i1 %0, icmp ne (ptr @"$s17has_symbol_helper1SVMa", ptr null)
// CHECK: ret i1 %1
// CHECK: [[V0:%.*]] = icmp ne ptr @"$s17has_symbol_helper1SVMn", null
// CHECK: [[V1:%.*]] = icmp ne ptr @"$s17has_symbol_helper1SVN", null
// CHECK: [[V2:%.*]] = and i1 [[V0]], [[V1]]
// CHECK: [[V3:%.*]] = icmp ne ptr @"$s17has_symbol_helper1SVMa", null
// CHECK: [[RES:%.*]] = and i1 [[V2]], [[V3]]
// CHECK: ret i1 [[RES]]

View File

@@ -17,12 +17,15 @@ public func testGlobalFunctions() {
// --- asyncFunc() ---
// CHECK: define linkonce_odr hidden i1 @"$s17has_symbol_helper9asyncFuncyyYaFTwS"()
// CHECK: %0 = and i1 icmp ne (ptr @"$s17has_symbol_helper9asyncFuncyyYaF", ptr null), icmp ne (ptr @"$s17has_symbol_helper9asyncFuncyyYaFTu", ptr null)
// CHECK: ret i1 %0
// CHECK: [[V0:%.*]] = icmp ne ptr @"$s17has_symbol_helper9asyncFuncyyYaF", null
// CHECK: [[V1:%.*]] = icmp ne ptr @"$s17has_symbol_helper9asyncFuncyyYaFTu", null
// CHECK: [[RES:%.*]] = and i1 [[V0]], [[V1]]
// CHECK: ret i1 [[RES]]
// --- isolatedFunc() ---
// CHECK: define linkonce_odr hidden i1 @"$s17has_symbol_helper12isolatedFuncyyFTwS"()
// CHECK: ret i1 icmp ne (ptr @"$s17has_symbol_helper12isolatedFuncyyF", ptr null)
// CHECK: [[RES:%.*]] = icmp ne ptr @"$s17has_symbol_helper12isolatedFuncyyF", null
// CHECK: ret i1 [[RES]]
public func testActor(_ a: A) {
// CHECK: %{{[0-9]+}} = call i1 @"$s17has_symbol_helper1ACACycfcTwS"()
@@ -36,11 +39,16 @@ public func testActor(_ a: A) {
// --- A.init() ---
// CHECK: define linkonce_odr hidden i1 @"$s17has_symbol_helper1ACACycfcTwS"()
// CHECK: %0 = and i1 icmp ne (ptr @"$s17has_symbol_helper1ACACycfc", ptr null), icmp ne (ptr @"$s17has_symbol_helper1ACACycfC", ptr null)
// CHECK: ret i1 %0
// CHECK: [[V0:%.*]] = icmp ne ptr @"$s17has_symbol_helper1ACACycfc", null
// CHECK: [[V1:%.*]] = icmp ne ptr @"$s17has_symbol_helper1ACACycfC", null
// CHECK: [[RES:%.*]] = and i1 [[V0]], [[V1]]
// CHECK: ret i1 [[RES]]
// --- A.asyncMethod() ---
// CHECK: define linkonce_odr hidden i1 @"$s17has_symbol_helper1AC11asyncMethodyyYaFTwS"()
// CHECK: %0 = and i1 icmp ne (ptr @"$s17has_symbol_helper1AC11asyncMethodyyYaFTj", ptr null), icmp ne (ptr @"$s17has_symbol_helper1AC11asyncMethodyyYaFTjTu", ptr null)
// CHECK: %1 = and i1 %0, icmp ne (ptr @"$s17has_symbol_helper1AC11asyncMethodyyYaFTq", ptr null)
// CHECK: ret i1 %1
// CHECK: [[V0:%.*]] = icmp ne ptr @"$s17has_symbol_helper1AC11asyncMethodyyYaFTj", null
// CHECK: [[V1:%.*]] = icmp ne ptr @"$s17has_symbol_helper1AC11asyncMethodyyYaFTjTu", null
// CHECK: [[V2:%.*]] = and i1 [[V0]], [[V1]]
// CHECK: [[V3:%.*]] = icmp ne ptr @"$s17has_symbol_helper1AC11asyncMethodyyYaFTq", null
// CHECK: [[RES:%.*]] = and i1 [[V2]], [[V3]]
// CHECK: ret i1 [[RES]]

View File

@@ -12,4 +12,5 @@ public func testClangDecls() {
// --- clangFunc(_:) ---
// CHECK: define linkonce_odr hidden i1 @"$sSo9clangFuncyys5Int32VFTwS"() #1{{( comdat)?}} {
// CHECK: ret i1 icmp ne (ptr @clangFunc, ptr null)
// CHECK: [[RES:%.*]] = icmp ne ptr @clangFunc, null
// CHECK: ret i1 [[RES]]

View File

@@ -11,4 +11,5 @@ public func testClassTypes() {
}
// CHECK: define linkonce_odr hidden i1 @"$sSo9ObjCClassCTwS"()
// CHECK: ret i1 icmp ne (ptr @"OBJC_CLASS_$_ObjCClass", ptr null)
// CHECK: [[RES:%.*]] = icmp ne ptr @"OBJC_CLASS_$_ObjCClass", null
// CHECK: ret i1 [[RES]]

View File

@@ -58,7 +58,7 @@ package class Foo {
// CHECK-COMMON-DAG: define linkonce_odr hidden swiftcc void @"$s4Core3FooC02myB0AA3PubCSgvpACTk"
// variable initialization expression of Core.Foo.myFoo
// CHECK-OPT-DAG: define {{(dllexport |protected )?}}swiftcc {{i32|i64}} @"$s4Core3FooC02myB0AA3PubCSgvpfi"() #0 {
// CHECK-OPT-DAG: define {{(dllexport |protected )?}}swiftcc{{.*}} {{i32|i64}} @"$s4Core3FooC02myB0AA3PubCSgvpfi"() #0 {
// Core.Foo.myFoo.getter
// CHECK-RES-DAG: define hidden {{.*}}swiftcc {{i32|i64}} @"$s4Core3FooC02myB0AA3PubCSgvg"(ptr swiftself %0)
@@ -107,7 +107,7 @@ package class Foo {
final package class Bar {
// CHECK-OPT-DAG: define {{(dllexport |protected )?}}swiftcc {{i32|i64}} @"$s4Core3BarC02myB0AA3PubCSgvpfi"()
// CHECK-OPT-DAG: define {{(dllexport |protected )?}}swiftcc{{.*}} {{i32|i64}} @"$s4Core3BarC02myB0AA3PubCSgvpfi"()
// CHECK-COMMON-DAG: define {{(dllexport |protected )?}}swiftcc {{i32|i64}} @"$s4Core3BarC02myB0AA3PubCSgvg"(ptr swiftself %0)
// CHECK-COMMON-DAG: define {{(dllexport |protected )?}}swiftcc void @"$s4Core3BarC02myB0AA3PubCSgvs"({{i32|i64}} %0, ptr swiftself %1)
// CHECK-COMMON-DAG: define {{(dllexport |protected )?}}swiftcc { ptr, ptr } @"$s4Core3BarC02myB0AA3PubCSgvM"

View File

@@ -213,7 +213,7 @@ sil @return_static_array : $@convention(thin) () -> TestArray {
bb0:
// CHECK: [[TMP:%.*]] = call swiftcc %swift.metadata_response @"$s18static_initializer16TestArrayStorageCMa"(i64 0)
// CHECK: [[MD:%[0-9]+]] = extractvalue %swift.metadata_response [[TMP]], 0
// CHECK: [[O:%[0-9a-z]+]] = call ptr @swift_initStaticObject(ptr [[MD]], ptr getelementptr inbounds (%T18static_initializer16TestArrayStorageC_tailelems0c, ptr @static_array, i32 0, i32 1))
// CHECK: [[O:%[0-9a-z]+]] = call ptr @swift_initStaticObject(ptr [[MD]], ptr getelementptr{{.*}} (%T18static_initializer16TestArrayStorageC_tailelems0c, ptr @static_array, i32 0, i32 1))
// CHECK: ret ptr [[O]]
%0 = global_value @static_array : $TestArrayStorage
%1 = struct $TestArray (%0 : $TestArrayStorage)

View File

@@ -6,9 +6,9 @@ import Builtin
// CHECK: define{{( dllexport)?}}{{( protected)?}} swiftcc void @undefined() {{.*}} {
// CHECK: entry:
// CHECK: store i64 undef, ptr poison, align 8
// CHECK: store i8 undef, ptr poison, align 8
// CHECK: store ptr undef, ptr poison, align 8
// CHECK: store i64 undef, ptr undef, align 8
// CHECK: store i8 undef, ptr undef, align 8
// CHECK: store ptr undef, ptr undef, align 8
// CHECK: ret void
// CHECK: }
sil @undefined : $() -> () {

View File

@@ -69,7 +69,8 @@ public func test_not_hoist_weakly_linked4() {
// CHECK: br i1 [[IS_STRONG]], label %[[BB0:[0-9]+]], label %[[BB1:[0-9]+]]
//
// CHECK: [[BB1]]:
// CHECK: br i1 icmp eq ({{.*}} ptrtoint (ptr @"$s31weak_import_native_hoist_helper1EO0A0yA2CmFWC" to {{.*}}), {{.*}} 0), label %[[BB2:[0-9]+]], label %[[BB3:[0-9]+]]
// CHECK: [[V0:%.*]] = icmp eq {{.*}} ptrtoint (ptr @"$s31weak_import_native_hoist_helper1EO0A0yA2CmFWC" to {{.*}}), 0
// CHECK: br i1 [[V0]], label %[[BB2:[0-9]+]], label %[[BB3:[0-9]+]]
//
// CHECK: [[BB3]]:
// CHECK: [[WEAK_CASE:%.*]] = load i32, ptr @"$s31weak_import_native_hoist_helper1EO0A0yA2CmFWC"