brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.4 KiB · 5b6dd39 Raw
48 lines · plain
1; RUN: llc -mtriple=armv7-apple-ios -O0 < %s | FileCheck %s2; RUN: llc -mtriple=armv7-apple-ios -O1 < %s | FileCheck %s3; RUN: llc -mtriple=armv7-apple-ios -O2 < %s | FileCheck %s4; RUN: llc -mtriple=armv7-apple-ios -O3 < %s | FileCheck %s5; RUN: llc -mtriple=armv7-apple-watchos -O3 < %s | FileCheck %s6; RUN: llc -mtriple=armv7k-apple-ios < %s | FileCheck %s --check-prefix=CHECK-WATCH7; RUN: llc -mtriple=armv7-linux -exception-model sjlj -O3 < %s | FileCheck %s --check-prefix=CHECK-LINUX8 9; SjLjEHPrepare shouldn't crash when lowering empty structs.10;11; Checks that between in case of empty structs used as arguments12; nothing happens, i.e. there are no instructions between13; __Unwind_SjLj_Register and actual @bar invocation14 15 16define ptr @foo(i8 %a, {} %c) personality ptr @baz {17entry:18; CHECK: bl __Unwind_SjLj_Register19; CHECK-NEXT: mov r0, #120; CHECK-NEXT: str r0, [sp, #{{[0-9]+}}]21; CHECK-NEXT: {{[A-Z][a-zA-Z0-9]*}}:22; CHECK-NEXT: bl _bar23; CHECK: bl __Unwind_SjLj_Resume24 25; CHECK-LINUX: bl _Unwind_SjLj_Register26; CHECK-LINUX-NEXT: mov r0, #127; CHECK-LINUX-NEXT: str r0, [sp, #{{[0-9]+}}]28; CHECK-LINUX-NEXT: .{{[A-Z][a-zA-Z0-9]*}}:29; CHECK-LINUX-NEXT: bl bar30; CHECK-LINUX: bl _Unwind_SjLj_Resume31 32; CHECK-WATCH-NOT: bl __Unwind_SjLj_Register33 34  invoke void @bar ()35    to label %unreachable unwind label %handler36 37unreachable:38  unreachable39 40handler:41  %tmp = landingpad { ptr, i32 }42  cleanup43  resume { ptr, i32 } undef44}45 46declare void @bar()47declare i32 @baz(...)48