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=armv7-apple-watchos -O3 < %s | FileCheck %s
6 ; RUN: llc -mtriple=armv7k-apple-ios < %s | FileCheck %s --check-prefix=CHECK-WATCH
7 ; RUN: llc -mtriple=armv7-linux -exception-model sjlj -O3 < %s | FileCheck %s --check-prefix=CHECK-LINUX
9 ; SjLjEHPrepare shouldn't crash when lowering empty structs.
11 ; Checks that between in case of empty structs used as arguments
12 ; nothing happens, i.e. there are no instructions between
13 ; __Unwind_SjLj_Register and actual @bar invocation
16 define ptr @foo(i8 %a, {} %c) personality ptr @baz {
18 ; CHECK: bl __Unwind_SjLj_Register
19 ; CHECK-NEXT: mov r0, #1
20 ; CHECK-NEXT: str r0, [sp, #{{[0-9]+}}]
21 ; CHECK-NEXT: {{[A-Z][a-zA-Z0-9]*}}:
23 ; CHECK: bl __Unwind_SjLj_Resume
25 ; CHECK-LINUX: bl _Unwind_SjLj_Register
26 ; CHECK-LINUX-NEXT: mov r0, #1
27 ; CHECK-LINUX-NEXT: str r0, [sp, #{{[0-9]+}}]
28 ; CHECK-LINUX-NEXT: .{{[A-Z][a-zA-Z0-9]*}}:
29 ; CHECK-LINUX-NEXT: bl bar
30 ; CHECK-LINUX: bl _Unwind_SjLj_Resume
32 ; CHECK-WATCH-NOT: bl __Unwind_SjLj_Register
35 to label %unreachable unwind label %handler
41 %tmp = landingpad { ptr, i32 }
43 resume { ptr, i32 } undef