diff options
author | Volker Reichelt <reichelt@igpm.rwth-aachen.de> | 2005-08-03 14:18:56 +0000 |
---|---|---|
committer | Volker Reichelt <reichelt@gcc.gnu.org> | 2005-08-03 14:18:56 +0000 |
commit | 9d2b0e128a1cf10949f7a5b6db2df7ef157ebd4c (patch) | |
tree | bac0d1350104882338d136860782796fa710de2b /gcc/tree-scalar-evolution.c | |
parent | 3ed831a4a786bb5357035449cc0e9bec967a7ad0 (diff) | |
download | gcc-9d2b0e128a1cf10949f7a5b6db2df7ef157ebd4c.zip gcc-9d2b0e128a1cf10949f7a5b6db2df7ef157ebd4c.tar.gz gcc-9d2b0e128a1cf10949f7a5b6db2df7ef157ebd4c.tar.bz2 |
re PR tree-optimization/19899 (ICE: tree check: expected real_cst, have integer_cst in const_binop, at fold-const.c:1490 with -ftree-vectorize -msse2)
PR tree-optimization/19899
* Makefile.in (tree-scalar-evolution.o): Add real.h.
* tree-scalar-evolution.c: Include real.h.
(add_to_evolution): Build constant -1 of correct type.
* gcc.dg/tree-ssa/scev-1.c: New test.
* gcc.dg/tree-ssa/scev-2.c: New test.
From-SVN: r102695
Diffstat (limited to 'gcc/tree-scalar-evolution.c')
-rw-r--r-- | gcc/tree-scalar-evolution.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/gcc/tree-scalar-evolution.c b/gcc/tree-scalar-evolution.c index 52a2d1a..507e3e9 100644 --- a/gcc/tree-scalar-evolution.c +++ b/gcc/tree-scalar-evolution.c @@ -237,6 +237,7 @@ Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA #include "tm.h" #include "ggc.h" #include "tree.h" +#include "real.h" /* These RTL headers are needed for basic-block.h. */ #include "rtl.h" @@ -866,8 +867,9 @@ add_to_evolution (unsigned loop_nb, } if (code == MINUS_EXPR) - to_add = chrec_fold_multiply (type, to_add, - build_int_cst_type (type, -1)); + to_add = chrec_fold_multiply (type, to_add, SCALAR_FLOAT_TYPE_P (type) + ? build_real (type, dconstm1) + : build_int_cst_type (type, -1)); res = add_to_evolution_1 (loop_nb, chrec_before, to_add); |