}
}
} else { // Not a ICMP_EQ/ICMP_NE
- // If the LHS is a cast from an integral value of the same size, then
- // since we know the RHS is a constant, try to simlify.
+ // If the LHS is a cast from an integral value of the same size,
+ // then since we know the RHS is a constant, try to simlify.
if (CastInst *Cast = dyn_cast<CastInst>(LHSI)) {
Value *CastOp = Cast->getOperand(0);
const Type *SrcTy = CastOp->getType();
MaskedValueIsZero(I->getOperand(0),
APInt::getHighBitsSet(OrigBitWidth, OrigBitWidth-BitWidth)) &&
CI->getLimitedValue(BitWidth) < BitWidth) {
- return CanEvaluateInDifferentType(I->getOperand(0), Ty, NumCastsRemoved);
+ return CanEvaluateInDifferentType(I->getOperand(0), Ty,NumCastsRemoved);
}
}
break;
Value *Sh = ConstantInt::get(In->getType(),
In->getType()->getPrimitiveSizeInBits()-1);
In = InsertNewInstBefore(BinaryOperator::createLShr(In, Sh,
- In->getName()+".lobit"),
+ In->getName()+".lobit"),
CI);
if (In->getType() != CI.getType())
In = CastInst::createIntegerCast(In, CI.getType(),
if (ICI->getPredicate() == ICmpInst::ICMP_SGT) {
Constant *One = ConstantInt::get(In->getType(), 1);
In = InsertNewInstBefore(BinaryOperator::createXor(In, One,
- In->getName()+".not"),
+ In->getName()+".not"),
CI);
}
Value *Sh = ConstantInt::get(In->getType(),
In->getType()->getPrimitiveSizeInBits()-1);
In = InsertNewInstBefore(BinaryOperator::createAShr(In, Sh,
- In->getName()+".lobit"),
+ In->getName()+".lobit"),
CI);
if (In->getType() != CI.getType())
In = CastInst::createIntegerCast(In, CI.getType(),
for (unsigned i = 0; i != 16; ++i) {
if (isa<UndefValue>(Mask->getOperand(i)))
continue;
- unsigned Idx =cast<ConstantInt>(Mask->getOperand(i))->getZExtValue();
+ unsigned Idx=cast<ConstantInt>(Mask->getOperand(i))->getZExtValue();
Idx &= 31; // Match the hardware behavior.
if (ExtractedElts[Idx] == 0) {
if (isa<ConstantInt>(EI->getOperand(1)) && isa<ConstantInt>(IdxOp) &&
EI->getOperand(0)->getType() == IE.getType()) {
unsigned NumVectorElts = IE.getType()->getNumElements();
- unsigned ExtractedIdx=cast<ConstantInt>(EI->getOperand(1))->getZExtValue();
+ unsigned ExtractedIdx =
+ cast<ConstantInt>(EI->getOperand(1))->getZExtValue();
unsigned InsertedIdx = cast<ConstantInt>(IdxOp)->getZExtValue();
if (ExtractedIdx >= NumVectorElts) // Out of range extract.
// Used inside Exit Block. Since we are in LCSSA form, U must be PHINode.
assert (U->getParent() == Exit
&& "Need to propagate new PHI into Exit blocks");
- assert (isa<PHINode>(U) && "Use in Exit Block that is not PHINode");
+ assert (isa<PHINode>(U) && "Use in Exit Block that is not PHINode");
PHINode *UPhi = cast<PHINode>(U);
Value *V = PN->getIncomingValueForBlock(OrigHeader);
if (isa<Instruction>(V) &&
(ILoopHeaderInfo = findReplacementData(cast<Instruction>(V)))) {
- assert (ILoopHeaderInfo->PreHeader && "Missing New Preheader Instruction");
+ assert(ILoopHeaderInfo->PreHeader && "Missing New Preheader Instruction");
PN->addIncoming(ILoopHeaderInfo->PreHeader, OrigPreHeader);
} else {
PN->addIncoming(V, OrigPreHeader);
IdxState.getConstant()));
else if (ValState.isUndefined() && EltState.isConstant() &&
IdxState.isConstant())
- markConstant(&I, ConstantExpr::getInsertElement(UndefValue::get(I.getType()),
- EltState.getConstant(),
- IdxState.getConstant()));
+ markConstant(&I,ConstantExpr::getInsertElement(UndefValue::get(I.getType()),
+ EltState.getConstant(),
+ IdxState.getConstant()));
#endif
}
Solver.MarkBlockExecutable(F.begin());
// Mark all arguments to the function as being overdefined.
- for (Function::arg_iterator AI = F.arg_begin(), E = F.arg_end(); AI != E; ++AI)
+ for (Function::arg_iterator AI = F.arg_begin(), E = F.arg_end(); AI != E;++AI)
Solver.markOverdefined(AI);
// Solve for constants.