Home | History | Annotate | Download | only in ARM
      1 ; RUN: llc < %s -mtriple=arm-unknown-unknown | FileCheck %s -check-prefix=NOOPTION
      2 ; RUN: llc < %s -mtriple=arm-unknown-unknown -trap-func=trap_llc | FileCheck %s -check-prefix=TRAP
      3 
      4 ; NOOPTION-LABEL: {{\_?}}foo0:
      5 ; NOOPTION: trap{{$}}
      6 
      7 ; TRAP-LABEL: {{\_?}}foo0:
      8 ; TRAP: bl {{\_?}}trap_llc
      9 
     10 define void @foo0() {
     11   call void @llvm.trap()
     12   unreachable
     13 }
     14 
     15 ; NOOPTION-LABEL: {{\_?}}foo1:
     16 ; NOOPTION: bl {{\_?}}trap_func_attr0
     17 
     18 ; TRAP-LABEL: {{\_?}}foo1:
     19 ; TRAP: bl {{\_?}}trap_llc
     20 
     21 define void @foo1() {
     22   call void @llvm.trap() #0
     23   unreachable
     24 }
     25 
     26 ; NOOPTION-LABEL: {{\_?}}foo2:
     27 ; NOOPTION: bl {{\_?}}trap_func_attr1
     28 
     29 ; TRAP-LABEL: {{\_?}}foo2:
     30 ; TRAP: bl {{\_?}}trap_llc
     31 
     32 define void @foo2() {
     33   call void @llvm.trap() #1
     34   unreachable
     35 }
     36 
     37 declare void @llvm.trap() nounwind
     38 
     39 attributes #0 = { "trap-func-name"="trap_func_attr0" }
     40 attributes #1 = { "trap-func-name"="trap_func_attr1" }
     41