[llvm] 6e7213b - [Analysis] Fix a warning
Kazu Hirata via llvm-commits
llvm-commits at lists.llvm.org
Fri Jan 31 23:30:34 PST 2025
Author: Kazu Hirata
Date: 2025-01-31T23:29:46-08:00
New Revision: 6e7213bc3031b37f008b6429796f9bee1c112c1f
URL: https://github.com/llvm/llvm-project/commit/6e7213bc3031b37f008b6429796f9bee1c112c1f
DIFF: https://github.com/llvm/llvm-project/commit/6e7213bc3031b37f008b6429796f9bee1c112c1f.diff
LOG: [Analysis] Fix a warning
This patch fixes:
llvm/lib/Analysis/ValueTracking.cpp:116:27: error: unused function
'safeCxtI' [-Werror,-Wunused-function]
Added:
Modified:
llvm/lib/Analysis/ValueTracking.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Analysis/ValueTracking.cpp b/llvm/lib/Analysis/ValueTracking.cpp
index 14606412fa2658..b3216f8fb78db9 100644
--- a/llvm/lib/Analysis/ValueTracking.cpp
+++ b/llvm/lib/Analysis/ValueTracking.cpp
@@ -113,24 +113,6 @@ static const Instruction *safeCxtI(const Value *V, const Instruction *CxtI) {
return nullptr;
}
-static const Instruction *safeCxtI(const Value *V1, const Value *V2, const Instruction *CxtI) {
- // If we've been provided with a context instruction, then use that (provided
- // it has been inserted).
- if (CxtI && CxtI->getParent())
- return CxtI;
-
- // If the value is really an already-inserted instruction, then use that.
- CxtI = dyn_cast<Instruction>(V1);
- if (CxtI && CxtI->getParent())
- return CxtI;
-
- CxtI = dyn_cast<Instruction>(V2);
- if (CxtI && CxtI->getParent())
- return CxtI;
-
- return nullptr;
-}
-
static bool getShuffleDemandedElts(const ShuffleVectorInst *Shuf,
const APInt &DemandedElts,
APInt &DemandedLHS, APInt &DemandedRHS) {
More information about the llvm-commits
mailing list