projects
/
platform
/
upstream
/
llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
52aa4e2
)
[ARM] Declare Op within an if statement (NFC)
author
Kazu Hirata
<kazu@google.com>
Thu, 31 Dec 2020 01:45:36 +0000
(17:45 -0800)
committer
Kazu Hirata
<kazu@google.com>
Thu, 31 Dec 2020 01:45:36 +0000
(17:45 -0800)
llvm/lib/Target/ARM/MVEGatherScatterLowering.cpp
patch
|
blob
|
history
diff --git
a/llvm/lib/Target/ARM/MVEGatherScatterLowering.cpp
b/llvm/lib/Target/ARM/MVEGatherScatterLowering.cpp
index
f36b341
..
b33e98e
100644
(file)
--- a/
llvm/lib/Target/ARM/MVEGatherScatterLowering.cpp
+++ b/
llvm/lib/Target/ARM/MVEGatherScatterLowering.cpp
@@
-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;