[llvm] r319067 - [InstCombine] use 'auto' with 'dyn_cast'; NFC
Sanjay Patel via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 27 10:19:33 PST 2017
Author: spatel
Date: Mon Nov 27 10:19:32 2017
New Revision: 319067
URL: http://llvm.org/viewvc/llvm-project?rev=319067&view=rev
Log:
[InstCombine] use 'auto' with 'dyn_cast'; NFC
Modified:
llvm/trunk/lib/Transforms/InstCombine/InstCombineVectorOps.cpp
Modified: llvm/trunk/lib/Transforms/InstCombine/InstCombineVectorOps.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/InstCombine/InstCombineVectorOps.cpp?rev=319067&r1=319066&r2=319067&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/InstCombine/InstCombineVectorOps.cpp (original)
+++ llvm/trunk/lib/Transforms/InstCombine/InstCombineVectorOps.cpp Mon Nov 27 10:19:32 2017
@@ -610,12 +610,11 @@ static Instruction *foldInsSequenceIntoB
// Walk the chain backwards, keeping track of which indices we inserted into,
// until we hit something that isn't an insert of the splatted value.
while (CurrIE) {
- ConstantInt *Idx = dyn_cast<ConstantInt>(CurrIE->getOperand(2));
+ auto *Idx = dyn_cast<ConstantInt>(CurrIE->getOperand(2));
if (!Idx || CurrIE->getOperand(1) != SplatVal)
return nullptr;
- InsertElementInst *NextIE =
- dyn_cast<InsertElementInst>(CurrIE->getOperand(0));
+ auto *NextIE = dyn_cast<InsertElementInst>(CurrIE->getOperand(0));
// Check none of the intermediate steps have any additional uses, except
// for the root insertelement instruction, which can be re-used, if it
// inserts at position 0.
More information about the llvm-commits
mailing list