[IndVars] Use `auto`; NFC

llvm-svn: 249944
This commit is contained in:
Sanjoy Das 2015-10-10 06:33:33 +00:00
parent 84008481e4
commit cc16ccc1ab
1 changed files with 4 additions and 6 deletions

View File

@ -962,14 +962,12 @@ Instruction *WidenIV::CloneIVUser(NarrowIVDefUse DU) {
Value *RHS = (DU.NarrowUse->getOperand(1) == DU.NarrowDef) ? DU.WideDef :
getExtend(DU.NarrowUse->getOperand(1), WideType, IsSigned, DU.NarrowUse);
BinaryOperator *NarrowBO = cast<BinaryOperator>(DU.NarrowUse);
BinaryOperator *WideBO = BinaryOperator::Create(NarrowBO->getOpcode(),
LHS, RHS,
auto *NarrowBO = cast<BinaryOperator>(DU.NarrowUse);
auto *WideBO = BinaryOperator::Create(NarrowBO->getOpcode(), LHS, RHS,
NarrowBO->getName());
IRBuilder<> Builder(DU.NarrowUse);
Builder.Insert(WideBO);
if (const OverflowingBinaryOperator *OBO =
dyn_cast<OverflowingBinaryOperator>(NarrowBO)) {
if (const auto *OBO = dyn_cast<OverflowingBinaryOperator>(NarrowBO)) {
if (OBO->hasNoUnsignedWrap()) WideBO->setHasNoUnsignedWrap();
if (OBO->hasNoSignedWrap()) WideBO->setHasNoSignedWrap();
}