// PHI.
for (BasicBlock::iterator I = BB.begin(); (PN = dyn_cast<PHINode>(I)); ++I)
for (unsigned i = 0, e = PN->getNumIncomingValues(); i != e; ++i) {
- ConstantExpr *CE = dyn_cast<ConstantExpr>(PN->getIncomingValue(i));
- if (!CE || !CE->canTrap()) continue;
+ Constant *C = dyn_cast<Constant>(PN->getIncomingValue(i));
+ if (!C || !C->canTrap()) continue;
// The only case we have to worry about is when the edge is critical.
// Since this block has a PHI Node, we assume it has multiple input
; CHECK-NEXT: testb $1, %dil
; CHECK-NEXT: je .LBB0_4
; CHECK-NEXT: # %bb.1: # %if
+; CHECK-NEXT: testb $1, %sil
+; CHECK-NEXT: je .LBB0_4
+; CHECK-NEXT: # %bb.2: # %if.end_crit_edge
; CHECK-NEXT: movl $1, %eax
; CHECK-NEXT: xorl %edx, %edx
; CHECK-NEXT: idivq g@GOTPCREL(%rip)
-; CHECK-NEXT: testb $1, %sil
-; CHECK-NEXT: je .LBB0_4
-; CHECK-NEXT: # %bb.2:
; CHECK-NEXT: movq %rdx, %rax
; CHECK-NEXT: retq
; CHECK-NEXT: .LBB0_4: # %end2