Skip to content

Commit

Permalink
[NFCI] Fix set-but-unused warning in InstCombineAddSub.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
davidbolvansky committed Mar 24, 2022
1 parent 9a738c4 commit 4397504
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions llvm/lib/Transforms/InstCombine/InstCombineAddSub.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -693,9 +693,6 @@ unsigned FAddCombine::calcInstrNumber(const AddendVect &Opnds) {
unsigned OpndNum = Opnds.size();
unsigned InstrNeeded = OpndNum - 1;

// The number of addends in the form of "(-1)*x".
unsigned NegOpndNum = 0;

// Adjust the number of instructions needed to emit the N-ary add.
for (const FAddend *Opnd : Opnds) {
if (Opnd->isConstant())
Expand All @@ -707,9 +704,6 @@ unsigned FAddCombine::calcInstrNumber(const AddendVect &Opnds) {
continue;

const FAddendCoef &CE = Opnd->getCoef();
if (CE.isMinusOne() || CE.isMinusTwo())
NegOpndNum++;

// Let the addend be "c * x". If "c == +/-1", the value of the addend
// is immediately available; otherwise, it needs exactly one instruction
// to evaluate the value.
Expand Down

0 comments on commit 4397504

Please sign in to comment.