brintos

brintos / llvm-project-archived public Read only

0
0
Text · 9.8 KiB · a74af48 Raw
313 lines · plain
1# RUN: llc -verify-machineinstrs -mcpu=pwr9 -mtriple powerpc64le-unknown-linux-gnu \2# RUN:   -run-pass=block-placement -o - %s | FileCheck %s3--- |4  ; ModuleID = 'test.ll'5  source_filename = "test.ll"6  target datalayout = "e-m:e-i64:64-n32:64"7  8  @_ZTIl = external constant ptr9  @_ZTIi = external constant ptr10  @_ZTIc = external constant ptr11  12  define dso_local void @_Z6calleev() local_unnamed_addr {13  entry:14    tail call void @__cxa_rethrow()15    unreachable16  }17  18  declare void @__cxa_rethrow() local_unnamed_addr19  20  define dso_local void @_Z14TestSinglePredv() local_unnamed_addr personality ptr @__gxx_personality_v0 {21  entry:22    br label %for.body23  24  for.cond.cleanup:                                 ; preds = %for.inc25    ret void26  27  for.body:                                         ; preds = %for.inc, %entry28    %lsr.iv = phi i32 [ %lsr.iv.next, %for.inc ], [ 10, %entry ]29    invoke void @__cxa_rethrow()30            to label %.noexc unwind label %lpad31  32  .noexc:                                           ; preds = %for.body33    unreachable34  35  lpad:                                             ; preds = %for.body36    %0 = landingpad { ptr, i32 }37            catch ptr @_ZTIl38            catch ptr @_ZTIi39            catch ptr null40    %1 = extractvalue { ptr, i32 } %0, 041    %2 = extractvalue { ptr, i32 } %0, 142    %3 = tail call i32 @llvm.eh.typeid.for(ptr @_ZTIl)43    %matches = icmp eq i32 %2, %344    br i1 %matches, label %catch4, label %catch.fallthrough45  46  catch4:                                           ; preds = %lpad47    %4 = tail call ptr @__cxa_begin_catch(ptr %1)48    invoke void @__cxa_rethrow()49            to label %unreachable unwind label %lpad650  51  catch.fallthrough:                                ; preds = %lpad52    %5 = tail call i32 @llvm.eh.typeid.for(ptr @_ZTIi)53    %matches1 = icmp eq i32 %2, %554    %6 = tail call ptr @__cxa_begin_catch(ptr %1)55    br i1 %matches1, label %catch2, label %catch56  57  catch2:                                           ; preds = %catch.fallthrough58    tail call void @__cxa_end_catch()59    br label %for.inc60  61  catch:                                            ; preds = %catch.fallthrough62    tail call void @__cxa_end_catch()63    br label %for.inc64  65  lpad6:                                            ; preds = %catch466    %7 = landingpad { ptr, i32 }67            cleanup68            catch ptr @_ZTIc69    %8 = extractvalue { ptr, i32 } %7, 170    %9 = tail call i32 @llvm.eh.typeid.for(ptr @_ZTIc)71    %matches9 = icmp eq i32 %8, %972    br i1 %matches9, label %catch10, label %ehcleanup73  74  catch10:                                          ; preds = %lpad675    %10 = extractvalue { ptr, i32 } %7, 076    %11 = tail call ptr @__cxa_begin_catch(ptr %10)77    tail call void @__cxa_end_catch()78    tail call void @__cxa_end_catch()79    br label %for.inc80  81  for.inc:                                          ; preds = %catch10, %catch, %catch282    %lsr.iv.next = add nsw i32 %lsr.iv, -183    %exitcond = icmp eq i32 %lsr.iv.next, 084    br i1 %exitcond, label %for.cond.cleanup, label %for.body85  86  ehcleanup:                                        ; preds = %lpad687    tail call void @__cxa_end_catch()88    %exn.obj = extractvalue { ptr, i32 } %7, 089    call void @_Unwind_Resume(ptr %exn.obj)90    unreachable91  92  unreachable:                                      ; preds = %catch493    unreachable94  }95  96  declare i32 @__gxx_personality_v0(...)97  98  ; Function Attrs: nounwind readnone99  declare i32 @llvm.eh.typeid.for(ptr) #0100  101  declare ptr @__cxa_begin_catch(ptr) local_unnamed_addr102  103  declare void @__cxa_end_catch() local_unnamed_addr104  105  ; Function Attrs: nounwind106  declare void @llvm.stackprotector(ptr, ptr) #1107  108  declare void @_Unwind_Resume(ptr)109  110  attributes #0 = { nounwind readnone }111  attributes #1 = { nounwind }112 113...114---115name:            _Z6calleev116alignment:       16117exposesReturnsTwice: false118legalized:       false119regBankSelected: false120selected:        false121failedISel:      false122tracksRegLiveness: true123hasWinCFI:       false124registers:       []125liveins:         []126frameInfo:127  isFrameAddressTaken: false128  isReturnAddressTaken: false129  hasStackMap:     false130  hasPatchPoint:   false131  stackSize:       32132  offsetAdjustment: 0133  maxAlignment:    0134  adjustsStack:    true135  hasCalls:        true136  stackProtector:  ''137  maxCallFrameSize: 32138  cvBytesOfCalleeSavedRegisters: 0139  hasOpaqueSPAdjustment: false140  hasVAStart:      false141  hasMustTailInVarArgFunc: false142  localFrameSize:  0143  savePoint:       []144  restorePoint:    []145fixedStack:      []146stack:           []147callSites:       []148constants:       []149machineFunctionInfo: {}150body:             |151  bb.0.entry:152    $x0 = MFLR8 implicit $lr8153    STD killed $x0, 16, $x1154    $x1 = STDU $x1, -32, $x1155    CFI_INSTRUCTION def_cfa_offset 32156    CFI_INSTRUCTION offset $lr8, 16157    BL8_NOP @__cxa_rethrow, csr_ppc64_altivec, implicit-def dead $lr8, implicit $rm, implicit-def $r1158 159...160---161name:            _Z14TestSinglePredv162alignment:       16163exposesReturnsTwice: false164legalized:       false165regBankSelected: false166selected:        false167failedISel:      false168tracksRegLiveness: true169hasWinCFI:       false170registers:       []171liveins:         []172frameInfo:173  isFrameAddressTaken: false174  isReturnAddressTaken: false175  hasStackMap:     false176  hasPatchPoint:   false177  stackSize:       64178  offsetAdjustment: 0179  maxAlignment:    0180  adjustsStack:    true181  hasCalls:        true182  stackProtector:  ''183  maxCallFrameSize: 32184  cvBytesOfCalleeSavedRegisters: 0185  hasOpaqueSPAdjustment: false186  hasVAStart:      false187  hasMustTailInVarArgFunc: false188  localFrameSize:  0189  savePoint:       []190  restorePoint:    []191fixedStack:192  - { id: 0, type: spill-slot, offset: -80, size: 8, alignment: 16, stack-id: default, 193      callee-saved-register: '$x30', callee-saved-restored: true, debug-info-variable: '', 194      debug-info-expression: '', debug-info-location: '' }195  - { id: 1, type: spill-slot, offset: -88, size: 8, alignment: 8, stack-id: default, 196      callee-saved-register: '$x29', callee-saved-restored: true, debug-info-variable: '', 197      debug-info-expression: '', debug-info-location: '' }198stack:           []199callSites:       []200constants:       []201machineFunctionInfo: {}202body:             |203  bb.0.entry:204    successors: %bb.1(0x80000000)205    liveins: $x29, $x30206  207    $x0 = MFLR8 implicit $lr8208    CFI_INSTRUCTION def_cfa_offset 64209    CFI_INSTRUCTION offset $lr8, 16210    CFI_INSTRUCTION offset $x29, -24211    CFI_INSTRUCTION offset $x30, -16212    STD killed $x29, -24, $x1 :: (store (s64) into %fixed-stack.1)213    STD killed $x30, -16, $x1 :: (store (s64) into %fixed-stack.0, align 16)214    STD killed $x0, 16, $x1215    $x1 = STDU $x1, -64, $x1216    renamable $r29 = LI 10217  218  bb.1.for.body:219    successors: %bb.2(0x7ffff800), %bb.3(0x00000800)220    liveins: $r29221  222    EH_LABEL <mcsymbol .Ltmp0>223    BL8_NOP @__cxa_rethrow, csr_ppc64_altivec, implicit-def dead $lr8, implicit $rm, implicit-def $r1224    EH_LABEL <mcsymbol .Ltmp1>225  226  bb.2..noexc:227    successors: 228  229  230  bb.3.lpad (landing-pad):231    successors: %bb.4(0x00000001), %bb.5(0x7fffffff)232    liveins: $r29, $x3, $x4233  234    EH_LABEL <mcsymbol .Ltmp2>235    $x30 = OR8 killed $x4, $x4236    renamable $cr0 = CMPLWI renamable $r30, 3237    BCC 71, killed renamable $cr0, %bb.5238  239  bb.4.catch4:240    successors: %bb.11(0x7ffff800), %bb.6(0x00000800)241    liveins: $r29, $x3242  243    BL8_NOP @__cxa_begin_catch, csr_ppc64_altivec, implicit-def dead $lr8, implicit $rm, implicit killed $x3, implicit $x2, implicit-def $r1, implicit-def dead $x3244    EH_LABEL <mcsymbol .Ltmp3>245    BL8_NOP @__cxa_rethrow, csr_ppc64_altivec, implicit-def dead $lr8, implicit $rm, implicit-def $r1246    EH_LABEL <mcsymbol .Ltmp4>247    B %bb.11248  249  bb.5.catch.fallthrough:250    successors: %bb.8(0x80000000)251    liveins: $r29, $x3, $x30252  253    BL8_NOP @__cxa_begin_catch, csr_ppc64_altivec, implicit-def dead $lr8, implicit $rm, implicit killed $x3, implicit $x2, implicit-def $r1, implicit-def dead $x3254    renamable $cr0 = CMPLWI killed renamable $r30, 2, implicit $x30255    B %bb.8256  257  bb.6.lpad6 (landing-pad):258    successors: %bb.7(0x7fffffff), %bb.10(0x00000001)259    liveins: $r29, $x3, $x4260  261    EH_LABEL <mcsymbol .Ltmp5>262    renamable $cr0 = CMPLWI killed renamable $r4, 4, implicit $x4263    $x30 = OR8 killed $x3, $x3264    BCC 70, killed renamable $cr0, %bb.10265  266  bb.7.catch10:267    successors: %bb.8(0x80000000)268    liveins: $r29, $x30269  270    $x3 = OR8 killed $x30, $x30271    BL8_NOP @__cxa_begin_catch, csr_ppc64_altivec, implicit-def dead $lr8, implicit $rm, implicit killed $x3, implicit-def $r1, implicit-def dead $x3272    BL8_NOP @__cxa_end_catch, csr_ppc64_altivec, implicit-def dead $lr8, implicit $rm, implicit-def $r1273  274  bb.8.for.inc:275    successors: %bb.9(0x04000000), %bb.1(0x7c000000)276    liveins: $r29277  278    BL8_NOP @__cxa_end_catch, csr_ppc64_altivec, implicit-def dead $lr8, implicit $rm, implicit-def $r1279    renamable $r29 = nsw ADDI killed renamable $r29, -1280    renamable $cr0 = CMPLWI renamable $r29, 0281    BCC 68, killed renamable $cr0, %bb.1282  283  bb.9.for.cond.cleanup:284    $x1 = ADDI8 $x1, 64285    $x0 = LD 16, $x1286    MTLR8 killed $x0, implicit-def $lr8287    $x30 = LD -16, $x1 :: (load (s64) from %fixed-stack.0, align 16)288    $x29 = LD -24, $x1 :: (load (s64) from %fixed-stack.1)289    BLR8 implicit $lr8, implicit $rm290  291  bb.10.ehcleanup:292    successors: 293    liveins: $x30294  295    BL8_NOP @__cxa_end_catch, csr_ppc64_altivec, implicit-def dead $lr8, implicit $rm, implicit-def $r1296    $x3 = OR8 killed $x30, $x30297    BL8_NOP @_Unwind_Resume, csr_ppc64_altivec, implicit-def dead $lr8, implicit $rm, implicit killed $x3, implicit-def $r1298  299  bb.11.unreachable:300 301  ; CHECK:      bb.1.for.body:302  ; CHECK:        successors: %bb.2(0x7ffff800), %bb.3(0x00000800)303  ; CHECK:        B %bb.2304 305  ; CHECK:      bb.4.catch4:306  ; CHECK:        successors: %bb.11(0x7ffff800), %bb.6(0x00000800)307  ; CHECK:        B %bb.11308 309  ; CHECK:      bb.2..noexc:310 311  ; CHECK:      bb.11.unreachable: 312...313