brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.0 KiB · 96adffc Raw
45 lines · plain
1;; Verify that @LPStart is omitted when there are no landing pads. This test2;; uses an unkown personality to force emitting the exception table.3 4; RUN: llc -basic-block-sections=all -mtriple=x86_64 < %s | FileCheck %s5 6declare void @throwit()7declare i32 @__unknown_ehpersonality(...)8 9define void @foo(i1 %cond) uwtable personality ptr @__unknown_ehpersonality {10entry:11  br i1 %cond, label %cond.true, label %cond.false12 13cond.true:                                        ; preds = %entry14  call void @throwit()15  unreachable16 17cond.false:                                         ; preds = %entry18  ret void19}20 21; CHECK:      GCC_except_table0:22; CHECK-NEXT: .Lexception0:23; CHECK-NEXT:   .byte	255                             # @LPStart Encoding = omit24; CHECK-NEXT:   .byte	255                             # @TType Encoding = omit25; CHECK-NEXT:   .byte	1                               # Call site Encoding = uleb12826; CHECK-NEXT:   .uleb128 .Laction_table_base0-.Lcst_begin027; CHECK-NEXT: .Lcst_begin0:28; CHECK-NEXT: .Lexception1:29; CHECK-NEXT:   .byte	255                             # @LPStart Encoding = omit30; CHECK-NEXT:   .byte	255                             # @TType Encoding = omit31; CHECK-NEXT:   .byte	1                               # Call site Encoding = uleb12832; CHECK-NEXT:   .uleb128 .Laction_table_base0-.Lcst_begin133; CHECK-NEXT: .Lcst_begin1:34; CHECK-NEXT: .Lexception2:35; CHECK-NEXT:   .byte	255                             # @LPStart Encoding = omit36; CHECK-NEXT:   .byte	255                             # @TType Encoding = omit37; CHECK-NEXT:   .byte	1                               # Call site Encoding = uleb12838; CHECK-NEXT:   .uleb128 .Laction_table_base0-.Lcst_begin239; CHECK-NEXT: .Lcst_begin2:40; CHECK-NEXT:   .uleb128 foo.__part.2-foo.__part.2      # >> Call Site 1 <<41; CHECK-NEXT:   .uleb128 .LBB_END0_2-foo.__part.2       #   Call between foo.__part.2 and .LBB_END0_242; CHECK-NEXT:   .byte	0                               #     has no landing pad43; CHECK-NEXT:   .byte	0                               #   On action: cleanup44; CHECK-NEXT: .Laction_table_base0:45