brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.9 KiB · a0bfd7f Raw
34 lines · plain
1;; Make sure we emit trap instructions after stack protector checks iff NoTrapAfterNoReturn is false.2 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 %s5; 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 %s7; 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 %s9 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 %s13; 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 %s15; 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 %s17 18; CHECK-LABEL: Machine code for function test19; CHECK: bb.0.entry:20; CHECK:  BL {{.}}__stack_chk_fail21; CHECK-NEXT: ADJCALLSTACKUP22; TRAP_UNREACHABLE-NEXT: BRK 123; NO_TRAP_UNREACHABLE-NOT: BRK 124; NO_TRAP_UNREACHABLE-EMPTY:25 26define void @test() nounwind ssp {27entry:28  %buf = alloca [8 x i8]29  %result = call i32(ptr) @callee(ptr %buf) nounwind30  ret void31}32 33declare i32 @callee(ptr) nounwind34