[llvm] r290848 - [EarlyCSE] less else, more auto; NFC
Sanjay Patel via llvm-commits
llvm-commits at lists.llvm.org
Mon Jan 2 16:16:24 PST 2017
Author: spatel
Date: Mon Jan 2 18:16:24 2017
New Revision: 290848
URL: http://llvm.org/viewvc/llvm-project?rev=290848&view=rev
Log:
[EarlyCSE] less else, more auto; NFC
Modified:
llvm/trunk/lib/Transforms/Scalar/EarlyCSE.cpp
Modified: llvm/trunk/lib/Transforms/Scalar/EarlyCSE.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/EarlyCSE.cpp?rev=290848&r1=290847&r2=290848&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/EarlyCSE.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/EarlyCSE.cpp Mon Jan 2 18:16:24 2017
@@ -481,9 +481,9 @@ private:
bool processNode(DomTreeNode *Node);
Value *getOrCreateResult(Value *Inst, Type *ExpectedType) const {
- if (LoadInst *LI = dyn_cast<LoadInst>(Inst))
+ if (auto *LI = dyn_cast<LoadInst>(Inst))
return LI;
- else if (StoreInst *SI = dyn_cast<StoreInst>(Inst))
+ if (auto *SI = dyn_cast<StoreInst>(Inst))
return SI->getValueOperand();
assert(isa<IntrinsicInst>(Inst) && "Instruction not supported");
return TTI.getOrCreateResultFromMemIntrinsic(cast<IntrinsicInst>(Inst),
More information about the llvm-commits
mailing list