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 8 9; SjLjEHPrepare shouldn't crash when lowering empty structs. 10; 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 14 15 16define i8* @foo(i8 %a, {} %c) personality i8* bitcast (i32 (...)* @baz to i8*) { 17entry: 18; CHECK: bl __Unwind_SjLj_Register 19; CHECK-NEXT: {{[A-Z][a-zA-Z0-9]*}}: 20; CHECK-NEXT: bl _bar 21; CHECK: bl __Unwind_SjLj_Resume 22 23; CHECK-LINUX: bl _Unwind_SjLj_Register 24; CHECK-LINUX-NEXT: .{{[A-Z][a-zA-Z0-9]*}}: 25; CHECK-LINUX-NEXT: bl bar 26; CHECK-LINUX: bl _Unwind_SjLj_Resume 27 28; CHECK-WATCH-NOT: bl __Unwind_SjLj_Register 29 30 invoke void @bar () 31 to label %unreachable unwind label %handler 32 33unreachable: 34 unreachable 35 36handler: 37 %tmp = landingpad { i8*, i32 } 38 cleanup 39 resume { i8*, i32 } undef 40} 41 42declare void @bar() 43declare i32 @baz(...) 44