diff options
author | Richard Sandiford <rsandifo@redhat.com> | 2003-03-31 06:28:56 +0000 |
---|---|---|
committer | Richard Sandiford <rsandifo@gcc.gnu.org> | 2003-03-31 06:28:56 +0000 |
commit | 98d3d336205c751fcf2f6a31a5b5553994556060 (patch) | |
tree | ed7e96e0e4c76bd11dbcda276ae08c406c605f95 | |
parent | 6b2d1c9e2b7dcdedd7b35b2c881ceced81085c23 (diff) | |
download | gcc-98d3d336205c751fcf2f6a31a5b5553994556060.zip gcc-98d3d336205c751fcf2f6a31a5b5553994556060.tar.gz gcc-98d3d336205c751fcf2f6a31a5b5553994556060.tar.bz2 |
gcse.c (simple_mem): Return false for floating-point accesses if flag_float_store is true.
* gcse.c (simple_mem): Return false for floating-point accesses
if flag_float_store is true.
From-SVN: r65076
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/gcse.c | 3 | ||||
-rw-r--r-- | gcc/testsuite/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/testsuite/gcc.c-torture/execute/ieee/20030331-1.c | 32 |
4 files changed, 44 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 266e9c7..ebb5b7e 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2003-03-31 Richard Sandiford <rsandifo@redhat.com> + + * gcse.c (simple_mem): Return false for floating-point accesses + if flag_float_store is true. + 2003-03-30 Roger Sayle <roger@eyesopen.com> * gcse.c (gcse_constant_p): New function to identify constants @@ -6657,6 +6657,9 @@ simple_mem (x) if (GET_MODE (x) == BLKmode) return 0; + if (flag_float_store && FLOAT_MODE_P (GET_MODE (x))) + return 0; + if (!rtx_varies_p (XEXP (x, 0), 0)) return 1; diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 1eb2836..2469ea4 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2003-03-31 Richard Sandiford <rsandifo@redhat.com> + + * gcc.c-torture/execute/ieee/20030331-1.c: New test. + 2003-03-30 Mark Mitchell <mark@codesourcery.com> PR c++/7647 diff --git a/gcc/testsuite/gcc.c-torture/execute/ieee/20030331-1.c b/gcc/testsuite/gcc.c-torture/execute/ieee/20030331-1.c new file mode 100644 index 0000000..64d87e1 --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/execute/ieee/20030331-1.c @@ -0,0 +1,32 @@ +extern void exit (int); +extern void abort (void); +float x = -1.5f; + +float +rintf () +{ + static const float TWO23 = 8388608.0; + + if (__builtin_fabs (x) < TWO23) + { + if (x > 0.0) + { + x += TWO23; + x -= TWO23; + } + else if (x < 0.0) + { + x = TWO23 - x; + x = -(x - TWO23); + } + } + + return x; +} + +int main (void) +{ + if (rintf () != -2.0) + abort (); + exit (0); +} |