[llvm-commits] CVS: llvm/lib/Transforms/Scalar/InstructionCombining.cpp
Chris Lattner
lattner at cs.uiuc.edu
Mon Oct 17 10:49:44 PDT 2005
Changes in directory llvm/lib/Transforms/Scalar:
InstructionCombining.cpp updated: 1.385 -> 1.386
---
Log message:
relax this a bit, as we only support the default rounding mode
---
Diffs of the changes: (+4 -2)
InstructionCombining.cpp | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
Index: llvm/lib/Transforms/Scalar/InstructionCombining.cpp
diff -u llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.385 llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.386
--- llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.385 Sun Oct 9 17:08:50 2005
+++ llvm/lib/Transforms/Scalar/InstructionCombining.cpp Mon Oct 17 12:49:32 2005
@@ -694,8 +694,10 @@
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
More information about the llvm-commits
mailing list