mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-25 00:33:15 +00:00
This Reassociate change unintentionally slipped in r222499
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222500 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
9970214474
commit
dac753cb73
@ -394,13 +394,6 @@ static BinaryOperator *LowerNegateToMultiply(Instruction *Neg) {
|
||||
BinaryOperator *Res = CreateMul(Neg->getOperand(1), NegOne, "", Neg, Neg);
|
||||
Neg->setOperand(1, Constant::getNullValue(Ty)); // Drop use of op.
|
||||
Res->takeName(Neg);
|
||||
if (Ty->isIntegerTy()) {
|
||||
bool NSW = cast<BinaryOperator>(Neg)->hasNoSignedWrap();
|
||||
bool NUW = cast<BinaryOperator>(Neg)->hasNoUnsignedWrap();
|
||||
if (NSW || NUW)
|
||||
Res->setHasNoSignedWrap(true);
|
||||
Res->setHasNoUnsignedWrap(NUW);
|
||||
}
|
||||
Neg->replaceAllUsesWith(Res);
|
||||
Res->setDebugLoc(Neg->getDebugLoc());
|
||||
return Res;
|
||||
|
Loading…
x
Reference in New Issue
Block a user