Skip to content

Commit 3821445

Browse files
committed
Ensure AUTH_CALL is not emitted when ptrauth subtarget feature is missing
1 parent 81cb742 commit 3821445

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

llvm/test/CodeGen/AArch64/GlobalISel/ptrauth-lowering-err.ll

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,3 +70,17 @@ define i32 @foo() {
7070
}
7171

7272
attributes #0 = { "ptrauth-returns" "target-cpu"="generic" }
73+
74+
;--- auth-call.ll
75+
76+
; RUN: not --crash llc -mtriple aarch64-elf auth-call.ll 2>&1 | \
77+
; RUN: FileCheck auth-call.ll
78+
79+
; CHECK: LLVM ERROR: Cannot select:{{.*}}AArch64ISD::AUTH_CALL
80+
81+
define void @bar(ptr %foo) #0 {
82+
call void %foo() [ "ptrauth"(i32 0, i64 0) ]
83+
ret void
84+
}
85+
86+
attributes #0 = { "ptrauth-calls" "target-cpu"="generic" }

0 commit comments

Comments
 (0)