Commit f0958ae6 authored by John Criswell's avatar John Criswell
Browse files

Merged in changes to the instruction combining pass.

llvm-svn: 15598
parent 7ee0099d
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -829,7 +829,7 @@ Instruction *InstCombiner::visitRem(BinaryOperator &I) {
  if (I.getType()->isSigned())
    if (Value *RHSNeg = dyn_castNegVal(I.getOperand(1)))
      if (!isa<ConstantSInt>(RHSNeg) ||
          cast<ConstantSInt>(RHSNeg)->getValue() >= 0) {
          cast<ConstantSInt>(RHSNeg)->getValue() > 0) {
        // X % -Y -> X % Y
        AddUsesToWorkList(I);
        I.setOperand(1, RHSNeg);