1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-21 12:02:58 +02:00

Simplify some code now that the RHS of a rem can't be 0

llvm-svn: 26413
This commit is contained in:
Chris Lattner 2006-02-28 05:40:55 +00:00
parent 8f416718b6
commit 63647f5028

View File

@ -1867,14 +1867,12 @@ Instruction *InstCombiner::visitRem(BinaryOperator &I) {
if (isPowerOf2_64(C->getValue()))
return BinaryOperator::createAnd(Op0, SubOne(C));
if (!RHS->isNullValue()) {
if (SelectInst *SI = dyn_cast<SelectInst>(Op0))
if (Instruction *R = FoldOpIntoSelect(I, SI, this))
return R;
if (isa<PHINode>(Op0))
if (Instruction *NV = FoldOpIntoPhi(I))
return NV;
}
if (SelectInst *SI = dyn_cast<SelectInst>(Op0))
if (Instruction *R = FoldOpIntoSelect(I, SI, this))
return R;
if (isa<PHINode>(Op0))
if (Instruction *NV = FoldOpIntoPhi(I))
return NV;
}
if (Instruction *RHSI = dyn_cast<Instruction>(I.getOperand(1))) {