222 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 = 'block-placement.ll'5 source_filename = "block-placement.ll"6 target datalayout = "e-m:e-i64:64-n32:64"7 target triple = "powerpc64le-unknown-linux-gnu"8 9 %"class.xercesc_2_7::HashXMLCh" = type { %"class.xercesc_2_7::HashBase" }10 %"class.xercesc_2_7::HashBase" = type { ptr }11 12 define dso_local zeroext i1 @_ZN11xercesc_2_79HashXMLCh6equalsEPKvS2_(ptr nocapture readnone %this, ptr readonly %key1, ptr readonly %key2) unnamed_addr #0 {13 entry:14 %cmp.i = icmp eq ptr %key1, null15 %cmp1.i = icmp eq ptr %key2, null16 %or.cond.i = or i1 %cmp.i, %cmp1.i17 br i1 %or.cond.i, label %if.then.i, label %while.cond.preheader.i18 19 while.cond.preheader.i: ; preds = %entry20 %0 = bitcast ptr %key2 to ptr21 %1 = bitcast ptr %key1 to ptr22 %2 = load i16, ptr %1, align 223 %3 = load i16, ptr %0, align 224 %cmp926.i = icmp eq i16 %2, %325 br i1 %cmp926.i, label %while.body.i.preheader, label %_ZN11xercesc_2_79XMLString6equalsEPKtS2_.exit26 27 while.body.i.preheader: ; preds = %while.cond.preheader.i28 %scevgep = getelementptr i8, ptr %key2, i64 229 %scevgep4 = getelementptr i8, ptr %key1, i64 230 br label %while.body.i31 32 if.then.i: ; preds = %entry33 br i1 %cmp.i, label %lor.lhs.false3.i, label %land.lhs.true.i34 35 land.lhs.true.i: ; preds = %if.then.i36 %4 = bitcast ptr %key1 to ptr37 %5 = load i16, ptr %4, align 238 %tobool.i = icmp eq i16 %5, 039 br i1 %tobool.i, label %lor.lhs.false3.i, label %_ZN11xercesc_2_79XMLString6equalsEPKtS2_.exit40 41 lor.lhs.false3.i: ; preds = %land.lhs.true.i, %if.then.i42 br i1 %cmp1.i, label %if.else.i, label %land.lhs.true5.i43 44 land.lhs.true5.i: ; preds = %lor.lhs.false3.i45 %6 = bitcast ptr %key2 to ptr46 %7 = load i16, ptr %6, align 247 %tobool6.i = icmp eq i16 %7, 048 br i1 %tobool6.i, label %if.else.i, label %_ZN11xercesc_2_79XMLString6equalsEPKtS2_.exit49 50 if.else.i: ; preds = %land.lhs.true5.i, %lor.lhs.false3.i51 br label %_ZN11xercesc_2_79XMLString6equalsEPKtS2_.exit52 53 while.body.i: ; preds = %while.body.i.preheader, %if.end12.i54 %lsr.iv5 = phi ptr [ %scevgep4, %while.body.i.preheader ], [ %scevgep6, %if.end12.i ]55 %lsr.iv = phi ptr [ %scevgep, %while.body.i.preheader ], [ %scevgep2, %if.end12.i ]56 %8 = phi i16 [ %15, %if.end12.i ], [ %2, %while.body.i.preheader ]57 %9 = phi ptr [ %key1, %while.body.i.preheader ], [ %13, %if.end12.i ]58 %10 = phi ptr [ %key2, %while.body.i.preheader ], [ %11, %if.end12.i ]59 %11 = getelementptr i8, ptr %10, i64 260 %12 = bitcast ptr %11 to ptr61 %13 = getelementptr i8, ptr %9, i64 262 %14 = bitcast ptr %13 to ptr63 %tobool10.i = icmp eq i16 %8, 064 br i1 %tobool10.i, label %_ZN11xercesc_2_79XMLString6equalsEPKtS2_.exit, label %if.end12.i65 66 if.end12.i: ; preds = %while.body.i67 %15 = load i16, ptr %14, align 268 %16 = load i16, ptr %12, align 269 %cmp9.i = icmp eq i16 %15, %1670 %scevgep2 = getelementptr i8, ptr %lsr.iv, i64 271 %scevgep6 = getelementptr i8, ptr %lsr.iv5, i64 272 br i1 %cmp9.i, label %while.body.i, label %_ZN11xercesc_2_79XMLString6equalsEPKtS2_.exit73 74 _ZN11xercesc_2_79XMLString6equalsEPKtS2_.exit: ; preds = %if.end12.i, %while.body.i, %if.else.i, %land.lhs.true5.i, %land.lhs.true.i, %while.cond.preheader.i75 %retval.0.i1 = phi i64 [ 1, %if.else.i ], [ 0, %land.lhs.true.i ], [ 0, %land.lhs.true5.i ], [ 0, %while.cond.preheader.i ], [ 0, %if.end12.i ], [ 1, %while.body.i ]76 %backToBool = trunc i64 %retval.0.i1 to i177 ret i1 %backToBool78 }79 80 attributes #0 = { "target-cpu"="pwr9" }81 82...83---84name: _ZN11xercesc_2_79HashXMLCh6equalsEPKvS2_85alignment: 1686exposesReturnsTwice: false87legalized: false88regBankSelected: false89selected: false90failedISel: false91tracksRegLiveness: true92hasWinCFI: false93registers: []94liveins:95 - { reg: '$x4', virtual-reg: '' }96 - { reg: '$x5', virtual-reg: '' }97frameInfo:98 isFrameAddressTaken: false99 isReturnAddressTaken: false100 hasStackMap: false101 hasPatchPoint: false102 stackSize: 0103 offsetAdjustment: 0104 maxAlignment: 0105 adjustsStack: false106 hasCalls: false107 stackProtector: ''108 maxCallFrameSize: 0109 cvBytesOfCalleeSavedRegisters: 0110 hasOpaqueSPAdjustment: false111 hasVAStart: false112 hasMustTailInVarArgFunc: false113 localFrameSize: 0114 savePoint: []115 restorePoint: []116fixedStack: []117stack: []118callSites: []119constants: []120machineFunctionInfo: {}121body: |122 bb.0.entry:123 successors: %bb.5(0x40000000), %bb.1(0x40000000)124 liveins: $x4, $x5125 126 renamable $cr1 = CMPDI renamable $x4, 0127 renamable $cr0 = CMPDI renamable $x5, 0128 renamable $cr5lt = CROR renamable $cr1eq, renamable $cr0eq129 BC killed renamable $cr5lt, %bb.5130 131 bb.1.while.cond.preheader.i:132 successors: %bb.2(0x40000000), %bb.11(0x40000000)133 liveins: $x4, $x5134 135 renamable $r8 = LHZ 0, renamable $x4 :: (load (s16) from %ir.1)136 renamable $r6 = LHZ 0, renamable $x5 :: (load (s16) from %ir.0)137 renamable $x3 = LI8 0138 renamable $cr0 = CMPLW renamable $r8, killed renamable $r6139 BCC 68, killed renamable $cr0, %bb.11140 141 bb.2.while.body.i.preheader:142 successors: %bb.3(0x80000000)143 liveins: $r8, $x3, $x4, $x5144 145 renamable $x6 = ADDI8 renamable $x5, 2146 renamable $x7 = ADDI8 renamable $x4, 2147 148 bb.3.while.body.i:149 successors: %bb.4(0x04000000), %bb.10(0x7c000000)150 liveins: $r8, $x3, $x4, $x5, $x6, $x7151 152 dead renamable $r8 = ANDI_rec killed renamable $r8, 65535, implicit-def $cr0153 BCC 68, killed renamable $cr0, %bb.10154 155 bb.4:156 renamable $x3 = LI8 1157 BLR8 implicit $lr8, implicit $rm, implicit killed $x3158 159 bb.5.if.then.i:160 successors: %bb.7(0x30000000), %bb.6(0x50000000)161 liveins: $cr0, $cr1, $x4, $x5162 163 BC killed renamable $cr1eq, %bb.7164 165 bb.6.land.lhs.true.i:166 successors: %bb.7(0x30000000), %bb.11(0x50000000)167 liveins: $cr0, $x4, $x5168 169 renamable $r4 = LHZ 0, killed renamable $x4 :: (load (s16) from %ir.4)170 renamable $x3 = LI8 0171 renamable $cr1 = CMPLWI killed renamable $r4, 0172 BCC 68, killed renamable $cr1, %bb.11173 174 bb.7.lor.lhs.false3.i:175 successors: %bb.9(0x30000000), %bb.8(0x50000000)176 liveins: $cr0, $x5177 178 BC killed renamable $cr0eq, %bb.9179 180 bb.8.land.lhs.true5.i:181 successors: %bb.9(0x80000000)182 liveins: $x5183 184 renamable $r4 = LHZ 0, killed renamable $x5 :: (load (s16) from %ir.6)185 renamable $x3 = LI8 0186 renamable $cr0 = CMPLWI killed renamable $r4, 0187 BCCLR 68, killed renamable $cr0, implicit $lr, implicit $rm, implicit killed $x3188 189 bb.9.if.else.i:190 renamable $x3 = LI8 1191 BLR8 implicit $lr8, implicit $rm, implicit killed $x3192 193 bb.10.if.end12.i:194 successors: %bb.3(0x7c000000), %bb.11(0x04000000)195 liveins: $x3, $x4, $x5, $x6, $x7196 197 renamable $x5 = ADDI8 killed renamable $x5, 2198 renamable $x4 = ADDI8 killed renamable $x4, 2199 renamable $r8 = LHZ 0, renamable $x4 :: (load (s16) from %ir.14)200 renamable $r9 = LHZ 0, renamable $x5 :: (load (s16) from %ir.12)201 renamable $x6 = ADDI8 killed renamable $x6, 2202 renamable $x7 = ADDI8 killed renamable $x7, 2203 renamable $cr0 = CMPLW renamable $r8, killed renamable $r9204 BCC 76, killed renamable $cr0, %bb.3205 206 bb.11._ZN11xercesc_2_79XMLString6equalsEPKtS2_.exit:207 liveins: $x3208 209 BLR8 implicit $lr8, implicit $rm, implicit killed $x3210 211 ; CHECK: bb.5.if.else.i:212 ; CHECK: successors: %bb.11(0x80000000)213 214 ; CHECK: bb.11:215 ; CHECK: renamable $x3 = LI8 1216 ; CHECK-NEXT: BLR8 implicit $lr8, implicit $rm, implicit killed $x3217 218 ; CHECK: bb.8.while.body.i (align 16):219 ; CHECK: successors: %bb.11(0x04000000), %bb.9(0x7c000000)220 ; CHECK: BCC 76, killed renamable $cr0, %bb.11221...222