mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-19 19:29:31 +00:00
relax this a bit, as we only support the default rounding mode
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23771 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
a1ff93159a
commit
560a17d3bc
@ -694,8 +694,10 @@ Instruction *InstCombiner::visitAdd(BinaryOperator &I) {
|
||||
return ReplaceInstUsesWith(I, RHS);
|
||||
|
||||
// X + 0 --> X
|
||||
if (!I.getType()->isFloatingPoint() && // -0 + +0 = +0, so it's not a noop
|
||||
RHSC->isNullValue())
|
||||
// NOTE: -0 + +0 = +0 in non-default rounding modes. When we support them
|
||||
// we must disable this. Note that 0.0-0.0 = -0.0, so this doesn't hold
|
||||
// for SUB.
|
||||
if (RHSC->isNullValue())
|
||||
return ReplaceInstUsesWith(I, LHS);
|
||||
|
||||
// X + (signbit) --> X ^ signbit
|
||||
|
Loading…
Reference in New Issue
Block a user