1; ARM EHABI integrated test 2 3; This test case checks that the ARM DWARF stack frame directives 4; are not generated if compiling with no debug information. 5 6; RUN: llc -mtriple arm-unknown-linux-gnueabi \ 7; RUN: -filetype=asm -o - %s \ 8; RUN: | FileCheck %s --check-prefix=CHECK-FP-ELIM 9 10; RUN: llc -mtriple thumb-unknown-linux-gnueabi \ 11; RUN: -disable-fp-elim -filetype=asm -o - %s \ 12; RUN: | FileCheck %s --check-prefix=CHECK-THUMB-FP 13 14;------------------------------------------------------------------------------- 15; Test 1 16;------------------------------------------------------------------------------- 17; This is the LLVM assembly generated from following C++ code: 18; 19; extern void print(int, int, int, int, int); 20; extern void print(double, double, double, double, double); 21; 22; void test(int a, int b, int c, int d, int e, 23; double m, double n, double p, double q, double r) { 24; try { 25; print(a, b, c, d, e); 26; } catch (...) { 27; print(m, n, p, q, r); 28; } 29; } 30 31declare void @_Z5printiiiii(i32, i32, i32, i32, i32) 32 33declare void @_Z5printddddd(double, double, double, double, double) 34 35define 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 i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) { 38entry: 39 invoke void @_Z5printiiiii(i32 %a, i32 %b, i32 %c, i32 %d, i32 %e) 40 to label %try.cont unwind label %lpad 41 42lpad: 43 %0 = landingpad { i8*, i32 } 44 catch i8* null 45 %1 = extractvalue { i8*, i32 } %0, 0 46 %2 = tail call i8* @__cxa_begin_catch(i8* %1) 47 invoke void @_Z5printddddd(double %m, double %n, double %p, 48 double %q, double %r) 49 to label %invoke.cont2 unwind label %lpad1 50 51invoke.cont2: 52 tail call void @__cxa_end_catch() 53 br label %try.cont 54 55try.cont: 56 ret void 57 58lpad1: 59 %3 = landingpad { i8*, i32 } 60 cleanup 61 invoke void @__cxa_end_catch() 62 to label %eh.resume unwind label %terminate.lpad 63 64eh.resume: 65 resume { i8*, i32 } %3 66 67terminate.lpad: 68 %4 = landingpad { i8*, i32 } 69 catch i8* null 70 %5 = extractvalue { i8*, i32 } %4, 0 71 tail call void @__clang_call_terminate(i8* %5) 72 unreachable 73} 74 75declare void @__clang_call_terminate(i8*) 76 77declare i32 @__gxx_personality_v0(...) 78 79declare i8* @__cxa_begin_catch(i8*) 80 81declare void @__cxa_end_catch() 82 83declare void @_ZSt9terminatev() 84 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 89 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 94 95