65 lines · plain
1; RUN: llc < %s -mtriple=armv4t--linux-androideabi -stop-after=if-converter | FileCheck %s2; Fix a bug triggered in IfConverterTriangle when CvtBB has multiple3; predecessors.4; PR187525 6%classK = type { i8, %classF }7%classF = type { i8 }8%classL = type { %classG, i32, i32 }9%classG = type { ptr }10%classM2 = type { %classL }11 12define zeroext i1 @test(ptr %this, ptr nocapture readnone %p0, ptr nocapture readnone %p1, ptr nocapture readnone %p2, i32 %a0) align 2 {13entry:14 br i1 undef, label %for.end, label %for.body15 16; Before if conversion, we have17; for.body -> lor.lhs.false.i (50%)18; -> for.cond.backedge (50%)19; lor.lhs.false.i -> for.cond.backedge (100%)20; -> cond.false.i (0%)21; Afer if conversion, we have22; for.body -> for.cond.backedge (100%)23; -> cond.false.i (0%)24; CHECK: bb.1.for.body:25; CHECK: successors: %bb.2(0x80000000), %bb.5(0x00000000)26for.body:27 br i1 undef, label %for.cond.backedge, label %lor.lhs.false.i, !prof !128 29for.cond.backedge:30 %tobool = icmp eq ptr %p0, null31 br i1 %tobool, label %for.end, label %for.body32 33lor.lhs.false.i:34 %tobool.i.i7 = icmp eq i32 %a0, 035 br i1 %tobool.i.i7, label %for.cond.backedge, label %cond.false.i36 37cond.false.i:38 call void @_Z3fn1v()39 unreachable40 41for.end:42 %tobool.i.i9 = icmp eq i32 %a0, 3243 br i1 %tobool.i.i9, label %if.else.i.i, label %if.then.i.i44 45if.then.i.i:46 store ptr null, ptr undef, align 447 br label %_ZN1M6spliceEv.exit48 49if.else.i.i:50 store ptr null, ptr null, align 451 br label %_ZN1M6spliceEv.exit52 53_ZN1M6spliceEv.exit:54 %LIS = getelementptr inbounds %classK, ptr %this, i32 0, i32 155 call void @_ZN1F10handleMoveEb(ptr %LIS, i1 zeroext false)56 unreachable57}58 59declare ptr @_ZN1M1JI1LS1_EcvPS1_Ev(ptr)60declare void @_ZN1F10handleMoveEb(ptr, i1 zeroext)61declare void @_Z3fn1v()62 63!0 = !{!"clang version 3.5"}64!1 = !{!"branch_weights", i32 62, i32 62}65