Skip to content

Commit 3ae1fd9

Browse files
committed
Address review feedback in tests.
1 parent 539b69c commit 3ae1fd9

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

llvm/test/Transforms/InstCombine/ptrauth-call.ll

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
22
; RUN: opt < %s -passes=instcombine -S | FileCheck %s
33

4-
target datalayout = "e-m:o-i64:64-i128:128-n32:64-S128"
5-
64
declare i64 @f(i32)
75
declare ptr @f2(i32)
86

@@ -85,4 +83,15 @@ define i32 @test_ptrauth_call_mismatch_blend(i32 %a0) {
8583
ret i32 %v0
8684
}
8785

86+
define i32 @test_ptrauth_call_mismatch_blend_addr(i32 %a0) {
87+
; CHECK-LABEL: @test_ptrauth_call_mismatch_blend_addr(
88+
; CHECK-NEXT: [[V:%.*]] = call i64 @llvm.ptrauth.blend(i64 ptrtoint (ptr @f_addr_disc.ref to i64), i64 1234)
89+
; CHECK-NEXT: [[V0:%.*]] = call i32 ptrauth (ptr @f, i32 1, i64 1234, ptr @f_both_disc.ref)(i32 [[A0:%.*]]) [ "ptrauth"(i32 1, i64 [[V]]) ]
90+
; CHECK-NEXT: ret i32 [[V0]]
91+
;
92+
%v = call i64 @llvm.ptrauth.blend(i64 ptrtoint (ptr @f_addr_disc.ref to i64), i64 1234)
93+
%v0 = call i32 ptrauth(ptr @f, i32 1, i64 1234, ptr @f_both_disc.ref)(i32 %a0) [ "ptrauth"(i32 1, i64 %v) ]
94+
ret i32 %v0
95+
}
96+
8897
declare i64 @llvm.ptrauth.blend(i64, i64)

0 commit comments

Comments
 (0)