We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7ee0099 commit f0958aeCopy full SHA for f0958ae
llvm/lib/Transforms/Scalar/InstructionCombining.cpp
@@ -829,7 +829,7 @@ Instruction *InstCombiner::visitRem(BinaryOperator &I) {
829
if (I.getType()->isSigned())
830
if (Value *RHSNeg = dyn_castNegVal(I.getOperand(1)))
831
if (!isa<ConstantSInt>(RHSNeg) ||
832
- cast<ConstantSInt>(RHSNeg)->getValue() >= 0) {
+ cast<ConstantSInt>(RHSNeg)->getValue() > 0) {
833
// X % -Y -> X % Y
834
AddUsesToWorkList(I);
835
I.setOperand(1, RHSNeg);
0 commit comments