Skip to content

Commit fa55fa3

Browse files
Merge pull request swiftlang#65949 from aschwaighofer/fix_two_irgen_tests_arm64e
Correct the CHECK patterns for two IRGen tests currently failing on arm64e
2 parents fa7189f + 28be34b commit fa55fa3

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

test/IRGen/partial_apply.sil

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
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
// RUN: %target-swift-frontend -Xllvm -sil-disable-pass=OnoneSimplification -I %t -emit-ir %s | %FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-%target-ptrsize
44

5+
// UNSUPPORTED: CPU=arm64e
6+
57
// REQUIRES: PTRSIZE=64
68

79
import Builtin

test/IRGen/ptrauth-objc-partial-apply.sil

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
// REQUIRES: CPU=arm64e
55
// REQUIRES: OS=ios
66

7-
// CHECK: @"$sTa.ptrauth" = private constant { i8*, i32, i64, i64 } { i8* bitcast (void (%swift.refcounted*)* @"$sTa" to i8*), i32 0, i64 0, i64 {{.*}} }, section "llvm.ptrauth"
87

98
@objc class A {
109
@objc func foo() {}
@@ -21,9 +20,11 @@ bb0(%0 : $A):
2120
unreachable
2221
}
2322

24-
// It would also be reasonable to not apply ptrauth here, but as long as we're partial_apply
23+
// The partial apply was optimized.
2524
// CHECK-LABEL: define swiftcc void @test0(
26-
// CHECK: call swiftcc void bitcast ({ i8*, i32, i64, i64 }* @"$sTa.ptrauth" to void (%swift.refcounted*)*)(%swift.refcounted* swiftself {{%.*}}) [ "ptrauth"(i32 0, i64 {{.*}}) ]
25+
// CHECK: %1 = load i8*, i8** @"\01L_selector(foo)"
26+
// CHECK: %2 = bitcast %T4test1AC* %0
27+
// CHECK: call void bitcast (void ()* @objc_msgSend to void (%0*, i8*)*)(%0* %2, i8* %1)
2728
sil @test0 : $@convention(thin) (@guaranteed A) -> () {
2829
bb0(%0: $A):
2930
%method = objc_method %0 : $A, #A.foo!foreign, $@convention(objc_method) (A) -> ()

0 commit comments

Comments
 (0)