140 lines · plain
1# RUN: llc -start-after=machine-sink -stop-after=peephole-opt -mtriple=powerpc64-unknown-linux-gnu -o - %s | FileCheck %s2 3--- |4 ; ModuleID = '<stdin>'5 source_filename = "<stdin>"6 target datalayout = "E-m:e-i64:64-n32:64"7 target triple = "powerpc64-unknown-linux-gnu"8 9 ; Function Attrs: nounwind readnone10 declare i128 @llvm.cttz.i128(i128, i1) #011 12 define void @fn1(i128, i128, i1) {13 top:14 br label %loop15 16 loop: ; preds = %loop, %top17 %v = phi i128 [ %3, %loop ], [ %0, %top ]18 %u = phi i128 [ %3, %loop ], [ %1, %top ]19 %s = sub i128 %v, %u20 %3 = call i128 @llvm.cttz.i128(i128 %s, i1 false)21 br label %loop22 }23 24 ; Function Attrs: nounwind25 declare void @llvm.stackprotector(ptr, ptr) #126 27 attributes #0 = { nounwind readnone }28 attributes #1 = { nounwind }29 30...31---32name: fn133alignment: 434exposesReturnsTwice: false35tracksRegLiveness: true36registers:37 - { id: 0, class: g8rc }38 - { id: 1, class: g8rc }39 - { id: 2, class: g8rc }40 - { id: 3, class: g8rc }41 - { id: 4, class: g8rc }42 - { id: 5, class: g8rc }43 - { id: 6, class: g8rc }44 - { id: 7, class: g8rc }45 - { id: 8, class: g8rc }46 - { id: 9, class: g8rc }47 - { id: 10, class: g8rc }48 - { id: 11, class: g8rc }49 - { id: 12, class: g8rc }50 - { id: 13, class: g8rc }51 - { id: 14, class: g8rc }52 - { id: 15, class: g8rc_and_g8rc_nox0 }53 - { id: 16, class: g8rc_and_g8rc_nox0 }54 - { id: 17, class: g8rc }55 - { id: 18, class: g8rc }56 - { id: 19, class: g8rc }57 - { id: 20, class: g8rc }58 - { id: 21, class: g8rc }59 - { id: 22, class: g8rc }60 - { id: 23, class: g8rc }61 - { id: 24, class: g8rc }62 - { id: 25, class: crrc }63 - { id: 26, class: g8rc_and_g8rc_nox0 }64 - { id: 27, class: g8rc_and_g8rc_nox0 }65liveins:66 - { reg: '$x3', virtual-reg: '%6' }67 - { reg: '$x4', virtual-reg: '%7' }68 - { reg: '$x5', virtual-reg: '%8' }69 - { reg: '$x6', virtual-reg: '%9' }70frameInfo:71 isFrameAddressTaken: false72 isReturnAddressTaken: false73 hasStackMap: false74 hasPatchPoint: false75 stackSize: 076 offsetAdjustment: 077 maxAlignment: 078 adjustsStack: false79 hasCalls: false80 maxCallFrameSize: 081 hasOpaqueSPAdjustment: false82 hasVAStart: false83 hasMustTailInVarArgFunc: false84body: |85 bb.0.top:86 successors: %bb.1.loop87 liveins: $x3, $x4, $x5, $x688 89 %9 = COPY $x690 %8 = COPY $x591 %7 = COPY $x492 %6 = COPY $x393 %14 = COPY %994 %13 = COPY %895 %12 = COPY %796 %11 = COPY %697 %21 = LI8 12898 %23 = LI8 6499 100 bb.1.loop:101 successors: %bb.2.loop, %bb.4102 103 %0 = PHI %11, %bb.0.top, %4, %bb.3.loop104 %1 = PHI %12, %bb.0.top, %5, %bb.3.loop105 %2 = PHI %13, %bb.0.top, %4, %bb.3.loop106 %3 = PHI %14, %bb.0.top, %5, %bb.3.loop107 %15 = SUBFC8 %3, %1, implicit-def $carry108 %16 = SUBFE8 %2, %0, implicit-def dead $carry, implicit $carry109 %17 = ADDI8 %16, -1110 %18 = ADDI8 %15, -1111 %19 = ANDC8 killed %17, %16112 %20 = ANDC8 killed %18, %15113 %22 = CNTLZD killed %19114 %24 = CNTLZD killed %20115 %25 = CMPLDI %15, 0116 BCC 76, %25, %bb.2.loop117 ; CHECK: SUBFC8_rec %3, %1, implicit-def $carry, implicit-def $cr0118 ; CHECK: COPY killed $cr0119 ; CHECK: BCC120 121 bb.4:122 successors: %bb.3.loop123 124 %27 = SUBF8 %24, %23125 B %bb.3.loop126 127 bb.2.loop:128 successors: %bb.3.loop129 130 %26 = SUBF8 %22, %21131 132 bb.3.loop:133 successors: %bb.1.loop134 135 %5 = PHI %26, %bb.2.loop, %27, %bb.4136 %4 = LI8 0137 B %bb.1.loop138 139...140