diff options
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/tree-ssa/pr71179.c | 10 | ||||
-rw-r--r-- | gcc/tree-ssa-reassoc.c | 3 |
4 files changed, 23 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 8585175..eee44b2 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2016-05-21 Kugan Vivekanandarajah <kuganv@linaro.org> + + PR middle-end/71179 + * tree-ssa-reassoc.c (transform_add_to_multiply): Disallow float + VECTOR type. + 2016-05-20 Eric Botcazou <ebotcazou@adacore.com> * tree-vrp.c (compare_values_warnv): Simplify handling of symbolic diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 70354d4..3fc92f1 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2016-05-21 Kugan Vivekanandarajah <kuganv@linaro.org> + + PR middle-end/71179 + * gcc.dg/tree-ssa/pr71179.c: New test. + 2016-05-20 Martin Sebor <msebor@redhat.com> PR c/71115 diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr71179.c b/gcc/testsuite/gcc.dg/tree-ssa/pr71179.c new file mode 100644 index 0000000..885c643 --- /dev/null +++ b/gcc/testsuite/gcc.dg/tree-ssa/pr71179.c @@ -0,0 +1,10 @@ + +/* { dg-do compile } */ +/* { dg-options "-O3 -ffast-math" } */ + +typedef float __m128 __attribute__ ((__vector_size__ (16), __may_alias__)); + +__m128 foo (__m128 a) +{ + return a + a; +} diff --git a/gcc/tree-ssa-reassoc.c b/gcc/tree-ssa-reassoc.c index 81b8977..3c718e9 100644 --- a/gcc/tree-ssa-reassoc.c +++ b/gcc/tree-ssa-reassoc.c @@ -1769,7 +1769,8 @@ transform_add_to_multiply (gimple *stmt, vec<operand_entry *> *ops) bool changed = false; if (!INTEGRAL_TYPE_P (TREE_TYPE ((*ops)[0]->op)) - && !flag_unsafe_math_optimizations) + && (!SCALAR_FLOAT_TYPE_P (TREE_TYPE ((*ops)[0]->op)) + || !flag_unsafe_math_optimizations)) return false; /* Look for repeated operands. */ |