-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathptrauth-lowering-err-debug.ll
More file actions
60 lines (40 loc) · 1.74 KB
/
ptrauth-lowering-err-debug.ll
File metadata and controls
60 lines (40 loc) · 1.74 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
; REQUIRES: asserts
; RUN: split-file %s %t && cd %t
;--- MOVaddrPAC.ll
; RUN: not --crash llc -debug-only=aarch64-expand-hardened-pseudos -mtriple aarch64-elf MOVaddrPAC.ll 2>&1 | \
; RUN: FileCheck MOVaddrPAC.ll
; CHECK: Expanding: MOVaddrPAC @foo
; CHECK-NEXT: {{^$}}
; CHECK-NEXT: LLVM ERROR: pac instructions require ptrauth target feature
@foo.ptrauth = private constant { ptr, i32, i64, i64 } { ptr @foo, i32 0, i64 0, i64 0 }, section "llvm.ptrauth", align 8
define ptr @bar() #0 {
ret ptr @foo.ptrauth
}
define private void @foo() {
ret void
}
attributes #0 = { "ptrauth-calls" "target-cpu"="generic" }
;--- LOADgotPAC.ll
; RUN: not --crash llc -debug-only=aarch64-expand-hardened-pseudos -mtriple aarch64-elf LOADgotPAC.ll 2>&1 | \
; RUN: FileCheck LOADgotPAC.ll
; CHECK: Expanding: LOADgotPAC @foo
; CHECK-NEXT: {{^$}}
; CHECK-NEXT: LLVM ERROR: pac instructions require ptrauth target feature
@foo.ptrauth = private constant { ptr, i32, i64, i64 } { ptr @foo, i32 0, i64 0, i64 0 }, section "llvm.ptrauth", align 8
define ptr @bar() #0 {
ret ptr @foo.ptrauth
}
declare void @foo()
attributes #0 = { "ptrauth-calls" "target-cpu"="generic" }
;--- LOADauthptrgot.ll
; RUN: not --crash llc -debug-only=aarch64-expand-hardened-pseudos -mtriple aarch64-elf LOADauthptrgot.ll 2>&1 | \
; RUN: FileCheck LOADauthptrgot.ll
; CHECK: Expanding: {{.*}}LOADauthptrgot @g_weak
; CHECK-NEXT: {{^$}}
; CHECK-NEXT: LLVM ERROR: pac instructions require ptrauth target feature
define ptr @foo() #0 {
ret ptr @g_weak.ptrauth
}
@g_weak = extern_weak global i32
@g_weak.ptrauth = private constant { ptr, i32, i64, i64 } { ptr @g_weak, i32 0, i64 0, i64 0 }, section "llvm.ptrauth"
attributes #0 = { "ptrauth-calls" "target-cpu"="generic" }