Bill Wendling | 151b44d | 2014-07-14 06:22:36 +0000 | [diff] [blame] | 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 |
Tim Northover | 042a6c1 | 2016-01-27 19:32:29 +0000 | [diff] [blame] | 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 |
Bill Wendling | 151b44d | 2014-07-14 06:22:36 +0000 | [diff] [blame] | 7 | |
| 8 | ; SjLjEHPrepare shouldn't crash when lowering empty structs. |
| 9 | ; |
| 10 | ; Checks that between in case of empty structs used as arguments |
| 11 | ; nothing happens, i.e. there are no instructions between |
| 12 | ; __Unwind_SjLj_Register and actual @bar invocation |
| 13 | |
| 14 | |
David Majnemer | 7fddecc | 2015-06-17 20:52:32 +0000 | [diff] [blame] | 15 | define i8* @foo(i8 %a, {} %c) personality i8* bitcast (i32 (...)* @baz to i8*) { |
Bill Wendling | 151b44d | 2014-07-14 06:22:36 +0000 | [diff] [blame] | 16 | entry: |
| 17 | ; CHECK: bl __Unwind_SjLj_Register |
| 18 | ; CHECK-NEXT: {{[A-Z][a-zA-Z0-9]*}}: |
| 19 | ; CHECK-NEXT: bl _bar |
Tim Northover | 042a6c1 | 2016-01-27 19:32:29 +0000 | [diff] [blame] | 20 | |
| 21 | ; CHECK-WATCH-NOT: bl __Unwind_SjLj_Register |
| 22 | |
Bill Wendling | 151b44d | 2014-07-14 06:22:36 +0000 | [diff] [blame] | 23 | invoke void @bar () |
| 24 | to label %unreachable unwind label %handler |
| 25 | |
| 26 | unreachable: |
| 27 | unreachable |
| 28 | |
| 29 | handler: |
David Majnemer | 7fddecc | 2015-06-17 20:52:32 +0000 | [diff] [blame] | 30 | %tmp = landingpad { i8*, i32 } |
Bill Wendling | 151b44d | 2014-07-14 06:22:36 +0000 | [diff] [blame] | 31 | cleanup |
| 32 | resume { i8*, i32 } undef |
| 33 | } |
| 34 | |
| 35 | declare void @bar() |
| 36 | declare i32 @baz(...) |