1 ; ARM EHABI integrated test
3 ; This test case checks that the ARM DWARF stack frame directives
4 ; are not generated if compiling with no debug information.
6 ; RUN: llc -mtriple arm-unknown-linux-gnueabi \
7 ; RUN: -filetype=asm -o - %s \
8 ; RUN: | FileCheck %s --check-prefix=CHECK-FP-ELIM
10 ; RUN: llc -mtriple thumb-unknown-linux-gnueabi \
11 ; RUN: -frame-pointer=all -filetype=asm -o - %s \
12 ; RUN: | FileCheck %s --check-prefix=CHECK-THUMB-FP
14 ;-------------------------------------------------------------------------------
16 ;-------------------------------------------------------------------------------
17 ; This is the LLVM assembly generated from following C++ code:
19 ; extern void print(int, int, int, int, int);
20 ; extern void print(double, double, double, double, double);
22 ; void test(int a, int b, int c, int d, int e,
23 ; double m, double n, double p, double q, double r) {
25 ; print(a, b, c, d, e);
27 ; print(m, n, p, q, r);
31 declare void @_Z5printiiiii(i32, i32, i32, i32, i32)
33 declare void @_Z5printddddd(double, double, double, double, double)
35 define void @_Z4testiiiiiddddd(i32 %a, i32 %b, i32 %c, i32 %d, i32 %e,
36 double %m, double %n, double %p,
37 double %q, double %r) personality ptr @__gxx_personality_v0 {
39 invoke void @_Z5printiiiii(i32 %a, i32 %b, i32 %c, i32 %d, i32 %e)
40 to label %try.cont unwind label %lpad
43 %0 = landingpad { ptr, i32 }
45 %1 = extractvalue { ptr, i32 } %0, 0
46 %2 = tail call ptr @__cxa_begin_catch(ptr %1)
47 invoke void @_Z5printddddd(double %m, double %n, double %p,
49 to label %invoke.cont2 unwind label %lpad1
52 tail call void @__cxa_end_catch()
59 %3 = landingpad { ptr, i32 }
61 invoke void @__cxa_end_catch()
62 to label %eh.resume unwind label %terminate.lpad
65 resume { ptr, i32 } %3
68 %4 = landingpad { ptr, i32 }
70 %5 = extractvalue { ptr, i32 } %4, 0
71 tail call void @__clang_call_terminate(ptr %5)
75 declare void @__clang_call_terminate(ptr)
77 declare i32 @__gxx_personality_v0(...)
79 declare ptr @__cxa_begin_catch(ptr)
81 declare void @__cxa_end_catch()
83 declare void @_ZSt9terminatev()
85 ; CHECK-FP-ELIM-LABEL: _Z4testiiiiiddddd:
86 ; CHECK-FP-ELIM-NOT: .cfi_startproc
87 ; CHECK-FP-ELIM: push {r4, r5, r6, r7, r8, r9, r10, r11, lr}
88 ; CHECK-FP-ELIM-NOT: .cfi_def_cfa_offset 36
90 ; CHECK-THUMB-FP-LABEL: _Z4testiiiiiddddd:
91 ; CHECK-THUMB-FP-NOT: .cfi_startproc
92 ; CHECK-THUMB-FP: push {r4, r5, r6, r7, lr}
93 ; CHECK-THUMB-FP-NOT: .cfi_def_cfa_offset 20