[ARM] Declare Op within an if statement (NFC)

This commit is contained in:
Kazu Hirata 2020-12-30 17:45:36 -08:00
parent 52aa4e2107
commit 331c28f60d
1 changed files with 1 additions and 2 deletions

View File

@ -939,11 +939,10 @@ bool MVEGatherScatterLowering::optimiseOffsets(Value *Offsets, BasicBlock *BB,
return false;
// The phi must be an induction variable
Instruction *Op;
int IncrementingBlock = -1;
for (int i = 0; i < 2; i++)
if ((Op = dyn_cast<Instruction>(Phi->getIncomingValue(i))) != nullptr)
if (auto *Op = dyn_cast<Instruction>(Phi->getIncomingValue(i)))
if (Op->getOpcode() == Instruction::Add &&
(Op->getOperand(0) == Phi || Op->getOperand(1) == Phi))
IncrementingBlock = i;