Re-land [openmp] Fix warnings when building on Windows with latest MSVC or Clang...
[llvm-project.git] / llvm / test / CodeGen / X86 / unwind-inline-asm-codegen.ll
blobbe873c3ce20e13b7c50728d0d8989f023d8051bb
1 ; RUN: llc < %s | FileCheck %s
3 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
4 target triple = "x86_64-unknown-linux-gnu"
6 @.str.2 = private unnamed_addr constant [7 x i8] c"Boom!\0A\00", align 1
8 define dso_local void @trap() {
9 entry:
10   unreachable
13 define dso_local void @test() personality ptr @__gxx_personality_v0 {
14 entry:
16 ; CHECK-LABEL: .Ltmp0:
17 ; CHECK: callq  trap
18 ; CHECK-LABEL: .Ltmp1:
20   invoke void asm sideeffect unwind "call trap", "~{dirflag},~{fpsr},~{flags}"()
21           to label %invoke.cont unwind label %lpad
23 invoke.cont:
24   ret void
26 lpad:
27   %0 = landingpad { ptr, i32 }
28           cleanup
29 ; CHECK: callq  printf
30   call void (ptr, ...) @printf(ptr @.str.2)
31   resume { ptr, i32 } %0
35 declare dso_local i32 @__gxx_personality_v0(...)
37 declare dso_local void @printf(ptr, ...)
39 ; Exception table generation around the inline assembly
41 ; CHECK-LABEL: GCC_except_table1:
42 ; CHECK-NEXT: .Lexception0:
43 ; CHECK-NEXT:  .byte 255                             # @LPStart Encoding = omit
44 ; CHECK-NEXT:  .byte 255                             # @TType Encoding = omit
45 ; CHECK-NEXT:  .byte 1                               # Call site Encoding = uleb128
46 ; CHECK-NEXT:  .uleb128 .Lcst_end0-.Lcst_begin0
47 ; CHECK-NEXT: .Lcst_begin0:
48 ; CHECK-NEXT:  .uleb128 .Ltmp0-.Lfunc_begin0           # >> Call Site 1 <<
49 ; CHECK-NEXT:  .uleb128 .Ltmp1-.Ltmp0                  #   Call between .Ltmp0 and .Ltmp1
50 ; CHECK-NEXT:  .uleb128 .Ltmp2-.Lfunc_begin0           #     jumps to .Ltmp2
51 ; CHECK-NEXT:  .byte 0                                 #   On action: cleanup
52 ; CHECK-NEXT:  .uleb128 .Ltmp1-.Lfunc_begin0           # >> Call Site 2 <<
53 ; CHECK-NEXT:  .uleb128 .Lfunc_end1-.Ltmp1             #   Call between .Ltmp1 and .Lfunc_end1
54 ; CHECK-NEXT:  .byte 0                                 #     has no landing pad
55 ; CHECK-NEXT:  .byte 0                                 #   On action: cleanup
56 ; CHECK-NEXT: .Lcst_end0: