blob: 689d93849939d4e0d3f8a212dbe91c57736a4cd8 (
plain)
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
|
;; This file contains the previous semantic of the branch-target-enforcement, sign-return-address.
;; Used for test mixing a mixed link case and also verify the import too in llc.
; RUN: llc -mattr=+pauth -mattr=+bti %s -o - | FileCheck %s
target datalayout = "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128"
target triple = "aarch64-unknown-linux-gnu"
define i32 @foo_on() #0 {
entry:
ret i32 42
}
; CHECK-LABEL: foo_on:
; CHECK: pacibsp
; CHECK: mov
; CHECK: retab
define i32 @foo_off() #1 {
entry:
ret i32 43
}
; CHECK-LABEL: foo_off:
; CHECK-NOT: pac
; CHECK-NOT: hint
; CHECK-NOT: bti
; CHECK: ret
attributes #0 = { noinline nounwind optnone uwtable }
attributes #1 = { noinline nounwind optnone uwtable "branch-target-enforcement"="false" "sign-return-address"="none" }
!llvm.module.flags = !{!0, !1, !2, !3}
!0 = !{i32 8, !"branch-target-enforcement", i32 1}
!1 = !{i32 8, !"sign-return-address", i32 1}
!2 = !{i32 8, !"sign-return-address-all", i32 1}
!3 = !{i32 8, !"sign-return-address-with-bkey", i32 1}
|