Skip to content

Commit 6bc72be

Browse files
committed
Move the fudge factor to a future pr
1 parent 93bfcbb commit 6bc72be

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

llvm/lib/Target/RISCV/RISCVISelLowering.cpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9288,10 +9288,7 @@ SDValue RISCVTargetLowering::lowerSELECT(SDValue Op, SelectionDAG &DAG) const {
92889288
return DeltaCost;
92899289
const int AddendCost = RISCVMatInt::getIntMatCost(
92909290
Addend, Subtarget.getXLen(), Subtarget, /*CompressionCost=*/true);
9291-
// Panalize the ADD slightly so that we prefer to end with an ADDI
9292-
// if costs are otherwise equal. This helps to expose the immediate
9293-
// for possible folding into a dependent memory instruction.
9294-
return AddendCost + DeltaCost + 1;
9291+
return AddendCost + DeltaCost;
92959292
};
92969293
bool IsCZERO_NEZ = getCost(FalseVal - TrueVal, TrueVal) <=
92979294
getCost(TrueVal - FalseVal, FalseVal);

0 commit comments

Comments
 (0)