diff options
author | Sanjay Patel <spatel@rotateright.com> | 2017-11-27 18:19:32 +0000 |
---|---|---|
committer | Sanjay Patel <spatel@rotateright.com> | 2017-11-27 18:19:32 +0000 |
commit | 863d494730da9758cb0ce10e1844b705fa3e503b (patch) | |
tree | 903f8edf3a775b5d9426b59e4a5571aa87330e3e | |
parent | a4120fc42c94ac22650286ce42f25b9f6f359285 (diff) | |
download | bcm5719-llvm-863d494730da9758cb0ce10e1844b705fa3e503b.tar.gz bcm5719-llvm-863d494730da9758cb0ce10e1844b705fa3e503b.zip |
[InstCombine] use 'auto' with 'dyn_cast'; NFC
llvm-svn: 319067
-rw-r--r-- | llvm/lib/Transforms/InstCombine/InstCombineVectorOps.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/llvm/lib/Transforms/InstCombine/InstCombineVectorOps.cpp b/llvm/lib/Transforms/InstCombine/InstCombineVectorOps.cpp index a454653a3a1..6c99007475c 100644 --- a/llvm/lib/Transforms/InstCombine/InstCombineVectorOps.cpp +++ b/llvm/lib/Transforms/InstCombine/InstCombineVectorOps.cpp @@ -610,12 +610,11 @@ static Instruction *foldInsSequenceIntoBroadcast(InsertElementInst &InsElt) { // 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. |