forked from OSchip/llvm-project
[InstCombine] use 'auto' with 'dyn_cast'; NFC
llvm-svn: 319067
This commit is contained in:
parent
a4120fc42c
commit
863d494730
|
@ -610,12 +610,11 @@ static Instruction *foldInsSequenceIntoBroadcast(InsertElementInst &InsElt) {
|
||||||
// Walk the chain backwards, keeping track of which indices we inserted into,
|
// 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.
|
// until we hit something that isn't an insert of the splatted value.
|
||||||
while (CurrIE) {
|
while (CurrIE) {
|
||||||
ConstantInt *Idx = dyn_cast<ConstantInt>(CurrIE->getOperand(2));
|
auto *Idx = dyn_cast<ConstantInt>(CurrIE->getOperand(2));
|
||||||
if (!Idx || CurrIE->getOperand(1) != SplatVal)
|
if (!Idx || CurrIE->getOperand(1) != SplatVal)
|
||||||
return nullptr;
|
return nullptr;
|
||||||
|
|
||||||
InsertElementInst *NextIE =
|
auto *NextIE = dyn_cast<InsertElementInst>(CurrIE->getOperand(0));
|
||||||
dyn_cast<InsertElementInst>(CurrIE->getOperand(0));
|
|
||||||
// Check none of the intermediate steps have any additional uses, except
|
// Check none of the intermediate steps have any additional uses, except
|
||||||
// for the root insertelement instruction, which can be re-used, if it
|
// for the root insertelement instruction, which can be re-used, if it
|
||||||
// inserts at position 0.
|
// inserts at position 0.
|
||||||
|
|
Loading…
Reference in New Issue