ARM: make sure backend is consistent about exception handling method.
[oota-llvm.git] / test / CodeGen / ARM / sjljehprepare-lower-empty-struct.ll
1 ; RUN: llc -mtriple=armv7-apple-ios -O0 < %s | FileCheck %s
2 ; RUN: llc -mtriple=armv7-apple-ios -O1 < %s | FileCheck %s
3 ; RUN: llc -mtriple=armv7-apple-ios -O2 < %s | FileCheck %s
4 ; RUN: llc -mtriple=armv7-apple-ios -O3 < %s | FileCheck %s
5 ; RUN: llc -mtriple=armv7k-apple-ios < %s | FileCheck %s
6
7 ; SjLjEHPrepare shouldn't crash when lowering empty structs.
8 ;
9 ; Checks that between in case of empty structs used as arguments
10 ; nothing happens, i.e. there are no instructions between
11 ; __Unwind_SjLj_Register and actual @bar invocation
12
13
14 define i8* @foo(i8 %a, {} %c) personality i8* bitcast (i32 (...)* @baz to i8*) {
15 entry:
16 ; CHECK: bl __Unwind_SjLj_Register
17 ; CHECK-NEXT: {{[A-Z][a-zA-Z0-9]*}}:
18 ; CHECK-NEXT: bl _bar
19   invoke void @bar ()
20     to label %unreachable unwind label %handler
21
22 unreachable:
23   unreachable
24
25 handler:
26   %tmp = landingpad { i8*, i32 }
27   cleanup
28   resume { i8*, i32 } undef
29 }
30
31 declare void @bar()
32 declare i32 @baz(...)