[llvm] b4013f9 - [MemorySSA] Fix an unused variable warning [NFC]
Philip Reames via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 17 16:08:08 PDT 2020
Author: Philip Reames
Date: 2020-09-17T16:07:59-07:00
New Revision: b4013f9c7febe70bddca16fb80a2e99623528871
URL: https://github.com/llvm/llvm-project/commit/b4013f9c7febe70bddca16fb80a2e99623528871
DIFF: https://github.com/llvm/llvm-project/commit/b4013f9c7febe70bddca16fb80a2e99623528871.diff
LOG: [MemorySSA] Fix an unused variable warning [NFC]
Added:
Modified:
llvm/include/llvm/Analysis/MemorySSA.h
Removed:
################################################################################
diff --git a/llvm/include/llvm/Analysis/MemorySSA.h b/llvm/include/llvm/Analysis/MemorySSA.h
index e1943849ed0e..d91b676d2e5a 100644
--- a/llvm/include/llvm/Analysis/MemorySSA.h
+++ b/llvm/include/llvm/Analysis/MemorySSA.h
@@ -1224,12 +1224,9 @@ class upward_defs_iterator
bool IsGuaranteedLoopInvariant(Value *Ptr) const {
auto IsGuaranteedLoopInvariantBase = [](Value *Ptr) {
Ptr = Ptr->stripPointerCasts();
- if (auto *I = dyn_cast<Instruction>(Ptr)) {
- if (isa<AllocaInst>(Ptr))
- return true;
- return false;
- }
- return true;
+ if (!isa<Instruction>(Ptr))
+ return true;
+ return isa<AllocaInst>(Ptr);
};
Ptr = Ptr->stripPointerCasts();
More information about the llvm-commits
mailing list