brintos

brintos / llvm-project-archived public Read only

0
0
Text · 5.9 KiB · 9230c31 Raw
185 lines · plain
1# RUN: llc -ppc-asm-full-reg-names -mtriple=powerpc64le-unknown-linux-gnu \2# RUN:   -run-pass=early-tailduplication,ppc-ctrloops %s -o - -verify-machineinstrs 2>&1 | FileCheck %s3 4--- |5  target datalayout = "e-m:e-i64:64-n32:64-S128-v256:256:256-v512:512:512"6  target triple = "powerpc64le-unknown-linux-gnu"7  8  define dso_local void @test() local_unnamed_addr {9  test_entry:10    %_val_domain_ = load i32, ptr undef, align 411    %_conv765 = sext i32 %_val_domain_ to i6412    br i1 undef, label %_label_42, label %_loop_40_loopHeader_13  14  _loop_40_loopHeader_:                             ; preds = %test_entry15    %_val_flags_1020 = load i32, ptr undef, align 416    %0 = and i32 %_val_flags_1020, 117    %_cond_conv_1022.not = icmp eq i32 %0, 018    %1 = sub i64 1, %_conv76519    %smax = call i64 @llvm.smax.i64(i64 %1, i64 1)20    br label %_label_4321  22  _label_43.loopexit:                               ; preds = %_loop_44_loopHeader_23    %lsr.iv.next = add i64 %lsr.iv, -124    br label %_label_4325  26  _label_43:                                        ; preds = %_label_43.loopexit, %_loop_40_loopHeader_27    %lsr.iv = phi i64 [ %lsr.iv.next, %_label_43.loopexit ], [ undef, %_loop_40_loopHeader_ ]28    call void @llvm.set.loop.iterations.i64(i64 %smax)29    br label %_loop_44_do_30  31  _loop_44_loopHeader_:                             ; preds = %_loop_44_do_32    %2 = call i1 @llvm.loop.decrement.i64(i64 1)33    br i1 %2, label %_loop_44_do_, label %_label_43.loopexit34  35  _loop_44_do_:                                     ; preds = %_loop_44_loopHeader_, %_label_4336    br i1 %_cond_conv_1022.not, label %_label_42.loopexit, label %_loop_44_loopHeader_37  38  _label_42.loopexit:                               ; preds = %_loop_44_do_39    %3 = trunc i64 %lsr.iv to i3240    store i32 %3, ptr undef, align 441    unreachable42  43  _label_42:                                        ; preds = %test_entry44    unreachable45  }46  47  ; Function Attrs: nocallback nofree nosync nounwind readnone speculatable willreturn48  declare i64 @llvm.smax.i64(i64, i64) #149  50  ; Function Attrs: nocallback noduplicate nofree nosync nounwind willreturn51  declare void @llvm.set.loop.iterations.i64(i64) #252  53  ; Function Attrs: nocallback noduplicate nofree nosync nounwind willreturn54  declare i1 @llvm.loop.decrement.i64(i64) #255  56  attributes #1 = { nocallback nofree nosync nounwind readnone speculatable willreturn }57  attributes #2 = { nocallback noduplicate nofree nosync nounwind willreturn }58  59  !llvm.ident = !{!0}60  61  !0 = !{!""}62 63...64---65name:            test66# CHECK: test67alignment:       1668exposesReturnsTwice: false69legalized:       false70regBankSelected: false71selected:        false72failedISel:      false73tracksRegLiveness: true74hasWinCFI:       false75callsEHReturn:   false76callsUnwindInit: false77hasEHContTarget: false78hasEHScopes:     false79hasEHFunclets:   false80failsVerification: false81tracksDebugUserValues: false82registers:83  - { id: 0, class: g8rc, preferred-register: '' }84  - { id: 1, class: crbitrc, preferred-register: '' }85  - { id: 2, class: g8rc, preferred-register: '' }86  - { id: 3, class: g8rc, preferred-register: '' }87  - { id: 4, class: g8rc_and_g8rc_nox0, preferred-register: '' }88  - { id: 5, class: g8rc_and_g8rc_nox0, preferred-register: '' }89  - { id: 6, class: crbitrc, preferred-register: '' }90  - { id: 7, class: g8rc, preferred-register: '' }91  - { id: 8, class: gprc, preferred-register: '' }92  - { id: 9, class: g8rc_and_g8rc_nox0, preferred-register: '' }93  - { id: 10, class: g8rc_and_g8rc_nox0, preferred-register: '' }94  - { id: 11, class: crrc, preferred-register: '' }95  - { id: 12, class: g8rc_and_g8rc_nox0, preferred-register: '' }96  - { id: 13, class: crbitrc, preferred-register: '' }97  - { id: 14, class: g8rc_and_g8rc_nox0, preferred-register: '' }98  - { id: 15, class: gprc, preferred-register: '' }99liveins:         []100frameInfo:101  isFrameAddressTaken: false102  isReturnAddressTaken: false103  hasStackMap:     false104  hasPatchPoint:   false105  stackSize:       0106  offsetAdjustment: 0107  maxAlignment:    1108  adjustsStack:    false109  hasCalls:        false110  stackProtector:  ''111  functionContext: ''112  maxCallFrameSize: 4294967295113  cvBytesOfCalleeSavedRegisters: 0114  hasOpaqueSPAdjustment: false115  hasVAStart:      false116  hasMustTailInVarArgFunc: false117  hasTailCall:     false118  localFrameSize:  0119  savePoint:       []120  restorePoint:    []121fixedStack:      []122stack:           []123callSites:       []124debugValueSubstitutions: []125constants:       []126machineFunctionInfo: {}127body:             |128  bb.0.test_entry:129    successors: %bb.7(0x40000000), %bb.1(0x40000000)130  131    %5:g8rc_and_g8rc_nox0 = IMPLICIT_DEF132    %0:g8rc = LWA 0, killed %5 :: (load (s32) from `ptr undef`)133    %6:crbitrc = IMPLICIT_DEF134    BC killed %6, %bb.7135    B %bb.1136  137  bb.1._loop_40_loopHeader_:138    successors: %bb.3(0x80000000)139  140    %9:g8rc_and_g8rc_nox0 = IMPLICIT_DEF141    %8:gprc = LWZ 0, %9 :: (load (s32) from `ptr undef`)142    %15:gprc = ANDI_rec %8, 1, implicit-def $cr0143    %1:crbitrc = COPY $cr0eq144    %10:g8rc_and_g8rc_nox0 = SUBFIC8 %0, 1, implicit-def dead $carry145    %11:crrc = CMPDI %10, 1146    %12:g8rc_and_g8rc_nox0 = LI8 1147    %2:g8rc = ISEL8 %10, %12, %11.sub_gt148    %7:g8rc = IMPLICIT_DEF149    B %bb.3150  151  bb.2._label_43.loopexit:152    successors: %bb.3(0x80000000)153  154    %3:g8rc = ADDI8 %4, -1155  156  bb.3._label_43:157    successors: %bb.5(0x80000000)158  159    %4:g8rc_and_g8rc_nox0 = PHI %7, %bb.1, %3, %bb.2160    MTCTR8loop %2, implicit-def dead $ctr8161    B %bb.5162  163  bb.4._loop_44_loopHeader_:164    successors: %bb.5(0x7c000000), %bb.2(0x04000000)165  166    %13:crbitrc = DecreaseCTR8loop 1, implicit-def dead $ctr8, implicit $ctr8167    BCn killed %13, %bb.2168    B %bb.5169  170  bb.5._loop_44_do_:171    successors: %bb.6(0x00000000), %bb.4(0x80000000)172  173    BCn %1, %bb.4174    B %bb.6175  176  bb.6._label_42.loopexit:177    successors: 178  179    %14:g8rc_and_g8rc_nox0 = IMPLICIT_DEF180    STW8 %4, 0, killed %14 :: (store (s32) into `ptr undef`)181  182  bb.7._label_42:183 184...185