For the case of a non-constant operand, fall back to
computeKnownBits() rather than trying to reimplement logic.
Found while testing a consistency assertion for both functions.
}
}
- // The sign bit is the LHS's sign bit, except when the result of the
- // remainder is zero.
- if (DemandedMask.isSignBitSet()) {
- computeKnownBits(I->getOperand(0), LHSKnown, Depth + 1, CxtI);
- // If it's known zero, our sign bit is also zero.
- if (LHSKnown.isNonNegative())
- Known.makeNonNegative();
- }
+ computeKnownBits(I, Known, Depth, CxtI);
break;
}
case Instruction::URem: {