1 ; RUN: llc -mtriple=thumbv7 -trap-unreachable < %s | FileCheck %s --check-prefixes CHECK,TRAP_UNREACHABLE
2 ; RUN: llc -mtriple=thumbv7 -trap-unreachable -no-trap-after-noreturn < %s | FileCheck %s --check-prefixes CHECK,NTANR
4 define void @test_trap_unreachable() #0 {
5 ; CHECK-LABEL: test_trap_unreachable:
7 ; CHECK-NEXT: .inst.n 0xdefe
11 attributes #0 = { nounwind }
13 declare void @no_return() noreturn
14 declare void @could_return()
16 define void @test_ntanr_noreturn() {
17 ; CHECK-LABEL: test_ntanr_noreturn:
19 ; CHECK-NEXT: push {r7, lr}
20 ; CHECK-NEXT: bl no_return
21 ; TRAP_UNREACHABLE-NEXT: .inst.n 0xdefe
22 ; NTANR-NOT: .inst.n 0xdefe
24 call void @no_return()
28 define void @test_ntanr_could_return() {
29 ; CHECK-LABEL: test_ntanr_could_return:
31 ; CHECK-NEXT: push {r7, lr}
32 ; CHECK-NEXT: bl could_return
33 ; CHECK-NEXT: .inst.n 0xdefe
34 call void @could_return()