[Xtensa] Implement Windowed Register Option. (#124656)
[llvm-project.git] / llvm / test / CodeGen / AArch64 / stack-protector-trap-unreachable.ll
bloba0bfd7fe06aa3d0af885dc060c09e73276d491a9
1 ;; Make sure we emit trap instructions after stack protector checks iff NoTrapAfterNoReturn is false.
3 ; RUN: llc -mtriple=aarch64 -fast-isel=false -global-isel=false -verify-machineinstrs -print-after=finalize-isel \
4 ; RUN:     -trap-unreachable=false -o /dev/null 2>&1 %s | FileCheck --check-prefixes=CHECK,NO_TRAP_UNREACHABLE %s
5 ; RUN: llc -mtriple=aarch64 -fast-isel=false -global-isel=false -verify-machineinstrs -print-after=finalize-isel \
6 ; RUN:     -trap-unreachable -no-trap-after-noreturn -o /dev/null 2>&1 %s | FileCheck --check-prefixes=CHECK,NO_TRAP_UNREACHABLE %s
7 ; RUN: llc -mtriple=aarch64 -fast-isel=false -global-isel=false -verify-machineinstrs -print-after=finalize-isel \
8 ; RUN:     -trap-unreachable -no-trap-after-noreturn=false -o /dev/null 2>&1 %s | FileCheck --check-prefixes=CHECK,TRAP_UNREACHABLE %s
10 ;; Make sure FastISel doesn't break anything.
11 ; RUN: llc -mtriple=aarch64 -fast-isel -verify-machineinstrs -print-after=finalize-isel \
12 ; RUN:     -trap-unreachable=false -o /dev/null 2>&1 %s | FileCheck --check-prefixes=CHECK,NO_TRAP_UNREACHABLE %s
13 ; RUN: llc -mtriple=aarch64 -fast-isel -verify-machineinstrs -print-after=finalize-isel \
14 ; RUN:     -trap-unreachable -no-trap-after-noreturn -o /dev/null 2>&1 %s | FileCheck --check-prefixes=CHECK,NO_TRAP_UNREACHABLE %s
15 ; RUN: llc -mtriple=aarch64 -fast-isel -verify-machineinstrs -print-after=finalize-isel \
16 ; RUN:     -trap-unreachable -no-trap-after-noreturn=false -o /dev/null 2>&1 %s | FileCheck --check-prefixes=CHECK,TRAP_UNREACHABLE %s
18 ; CHECK-LABEL: Machine code for function test
19 ; CHECK: bb.0.entry:
20 ; CHECK:  BL {{.}}__stack_chk_fail
21 ; CHECK-NEXT: ADJCALLSTACKUP
22 ; TRAP_UNREACHABLE-NEXT: BRK 1
23 ; NO_TRAP_UNREACHABLE-NOT: BRK 1
24 ; NO_TRAP_UNREACHABLE-EMPTY:
26 define void @test() nounwind ssp {
27 entry:
28   %buf = alloca [8 x i8]
29   %result = call i32(ptr) @callee(ptr %buf) nounwind
30   ret void
33 declare i32 @callee(ptr) nounwind