aboutsummaryrefslogtreecommitdiff
path: root/gcc/simplify-rtx.c
diff options
context:
space:
mode:
authorJoseph Myers <joseph@codesourcery.com>2013-11-21 16:20:28 +0000
committerJoseph Myers <jsm28@gcc.gnu.org>2013-11-21 16:20:28 +0000
commit3c8e8595edb357b7ff80c86c46f79823ed1ecce1 (patch)
tree83b4eb3d53777452e702fa4c144848ae515b5422 /gcc/simplify-rtx.c
parent15e693cc593824fa56a2e52b756e1e2e4bad2a27 (diff)
downloadgcc-3c8e8595edb357b7ff80c86c46f79823ed1ecce1.zip
gcc-3c8e8595edb357b7ff80c86c46f79823ed1ecce1.tar.gz
gcc-3c8e8595edb357b7ff80c86c46f79823ed1ecce1.tar.bz2
re PR rtl-optimization/55950 (Invalid sqrt constant propagation with -frounding-mode)
PR rtl-optimization/55950 * real.c (real_sqrt): Remove function. * real.h (real_sqrt): Remove prototype. * simplify-rtx.c (simplify_const_unary_operation): Do not fold SQRT using real_sqrt. From-SVN: r205223
Diffstat (limited to 'gcc/simplify-rtx.c')
-rw-r--r--gcc/simplify-rtx.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/gcc/simplify-rtx.c b/gcc/simplify-rtx.c
index 791f90d..ec13858 100644
--- a/gcc/simplify-rtx.c
+++ b/gcc/simplify-rtx.c
@@ -1931,17 +1931,13 @@ simplify_const_unary_operation (enum rtx_code code, enum machine_mode mode,
&& SCALAR_FLOAT_MODE_P (mode)
&& SCALAR_FLOAT_MODE_P (GET_MODE (op)))
{
- REAL_VALUE_TYPE d, t;
+ REAL_VALUE_TYPE d;
REAL_VALUE_FROM_CONST_DOUBLE (d, op);
switch (code)
{
case SQRT:
- if (HONOR_SNANS (mode) && real_isnan (&d))
- return 0;
- real_sqrt (&t, mode, &d);
- d = t;
- break;
+ return 0;
case ABS:
d = real_value_abs (&d);
break;