diff options
| author | Chris Lattner <sabre@nondot.org> | 2005-10-17 17:49:32 +0000 | 
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2005-10-17 17:49:32 +0000 | 
| commit | 32979336a70e4c01f4af4212dda8e5932fdccb12 (patch) | |
| tree | 7630054ed4d977496ddcf75db4b917608c611e2b /llvm/lib/Transforms | |
| parent | 8113c67003a47ec4acf0dd95313f36bb94df23ff (diff) | |
| download | bcm5719-llvm-32979336a70e4c01f4af4212dda8e5932fdccb12.tar.gz bcm5719-llvm-32979336a70e4c01f4af4212dda8e5932fdccb12.zip | |
relax this a bit, as we only support the default rounding mode
llvm-svn: 23771
Diffstat (limited to 'llvm/lib/Transforms')
| -rw-r--r-- | llvm/lib/Transforms/Scalar/InstructionCombining.cpp | 6 | 
1 files changed, 4 insertions, 2 deletions
| diff --git a/llvm/lib/Transforms/Scalar/InstructionCombining.cpp b/llvm/lib/Transforms/Scalar/InstructionCombining.cpp index cf4af791691..67a54018c37 100644 --- a/llvm/lib/Transforms/Scalar/InstructionCombining.cpp +++ b/llvm/lib/Transforms/Scalar/InstructionCombining.cpp @@ -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 | 

