47 lines · plain
1; RUN: llc -mtriple=arm64 -global-isel=0 -fast-isel=0 -relocation-model=pic -o - %s \2; RUN: -mcpu=cyclone -mattr=+pauth -mattr=+fpac | FileCheck --check-prefixes=CHECK,NOTRAP %s3; RUN: llc -mtriple=arm64 -global-isel=0 -fast-isel=0 -relocation-model=pic -o - %s \4; RUN: -mcpu=cyclone -mattr=+pauth | FileCheck --check-prefixes=CHECK,TRAP %s5 6; RUN: llc -mtriple=arm64 -global-isel=0 -fast-isel=1 -relocation-model=pic -o - %s \7; RUN: -mcpu=cyclone -mattr=+pauth -mattr=+fpac | FileCheck --check-prefixes=CHECK,NOTRAP %s8; RUN: llc -mtriple=arm64 -global-isel=0 -fast-isel=1 -relocation-model=pic -o - %s \9; RUN: -mcpu=cyclone -mattr=+pauth | FileCheck --check-prefixes=CHECK,TRAP %s10 11; RUN: llc -mtriple=arm64 -global-isel=1 -global-isel-abort=1 -relocation-model=pic -o - %s \12; RUN: -mcpu=cyclone -mattr=+pauth -mattr=+fpac | FileCheck --check-prefixes=CHECK,NOTRAP %s13; RUN: llc -mtriple=arm64 -global-isel=1 -global-isel-abort=1 -relocation-model=pic -o - %s \14; RUN: -mcpu=cyclone -mattr=+pauth | FileCheck --check-prefixes=CHECK,TRAP %s15 16;; Note: for FastISel, we fall back to SelectionDAG17 18@var8 = external global i8, align 119 20define i8 @test_i8(i8 %new) {21 %val = load i8, ptr @var8, align 122 store i8 %new, ptr @var823 ret i8 %val24 25; CHECK-LABEL: test_i8:26; CHECK: adrp x17, :got_auth:var827; CHECK-NEXT: add x17, x17, :got_auth_lo12:var828; NOTRAP-NEXT: ldr x9, [x17]29; NOTRAP-NEXT: autda x9, x1730; TRAP-NEXT: ldr x16, [x17]31; TRAP-NEXT: autda x16, x1732; TRAP-NEXT: mov x17, x1633; TRAP-NEXT: xpacd x1734; TRAP-NEXT: cmp x16, x1735; TRAP-NEXT: b.eq .Lauth_success_036; TRAP-NEXT: brk #0xc47237; TRAP-NEXT: .Lauth_success_0:38; TRAP-NEXT: mov x9, x1639; CHECK-NEXT: ldrb w8, [x9]40; CHECK-NEXT: strb w0, [x9]41; CHECK-NEXT: mov x0, x842; CHECK-NEXT: ret43}44 45!llvm.module.flags = !{!0}46!0 = !{i32 8, !"ptrauth-elf-got", i32 1}47