Skip to content

Commit 6e7213b

Browse files
[Analysis] Fix a warning
This patch fixes: llvm/lib/Analysis/ValueTracking.cpp:116:27: error: unused function 'safeCxtI' [-Werror,-Wunused-function]
1 parent 65708ba commit 6e7213b

File tree

1 file changed

+0
-18
lines changed

1 file changed

+0
-18
lines changed

llvm/lib/Analysis/ValueTracking.cpp

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -113,24 +113,6 @@ static const Instruction *safeCxtI(const Value *V, const Instruction *CxtI) {
113113
return nullptr;
114114
}
115115

116-
static const Instruction *safeCxtI(const Value *V1, const Value *V2, const Instruction *CxtI) {
117-
// If we've been provided with a context instruction, then use that (provided
118-
// it has been inserted).
119-
if (CxtI && CxtI->getParent())
120-
return CxtI;
121-
122-
// If the value is really an already-inserted instruction, then use that.
123-
CxtI = dyn_cast<Instruction>(V1);
124-
if (CxtI && CxtI->getParent())
125-
return CxtI;
126-
127-
CxtI = dyn_cast<Instruction>(V2);
128-
if (CxtI && CxtI->getParent())
129-
return CxtI;
130-
131-
return nullptr;
132-
}
133-
134116
static bool getShuffleDemandedElts(const ShuffleVectorInst *Shuf,
135117
const APInt &DemandedElts,
136118
APInt &DemandedLHS, APInt &DemandedRHS) {

0 commit comments

Comments
 (0)