From: Kugan Vivekanandarajah Date: Sat, 21 May 2016 07:09:16 +0000 (+0000) Subject: re PR tree-optimization/71179 (ice fold_convert_loc, at fold-const.c:2360) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=88aea79f3cd5933088c99f0ebe3e34285c2b201d;p=gcc.git re PR tree-optimization/71179 (ice fold_convert_loc, at fold-const.c:2360) gcc/testsuite/ChangeLog: 2016-05-21 Kugan Vivekanandarajah PR middle-end/71179 * gcc.dg/tree-ssa/pr71179.c: New test. gcc/ChangeLog: 2016-05-21 Kugan Vivekanandarajah PR middle-end/71179 * tree-ssa-reassoc.c (transform_add_to_multiply): Disallow float VECTOR type. From-SVN: r236554 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 8585175482a..eee44b27972 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2016-05-21 Kugan Vivekanandarajah + + PR middle-end/71179 + * tree-ssa-reassoc.c (transform_add_to_multiply): Disallow float + VECTOR type. + 2016-05-20 Eric Botcazou * tree-vrp.c (compare_values_warnv): Simplify handling of symbolic diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 70354d4e4be..3fc92f10d66 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2016-05-21 Kugan Vivekanandarajah + + PR middle-end/71179 + * gcc.dg/tree-ssa/pr71179.c: New test. + 2016-05-20 Martin Sebor 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 00000000000..885c643b927 --- /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 81b89777af1..3c718e9b204 100644 --- a/gcc/tree-ssa-reassoc.c +++ b/gcc/tree-ssa-reassoc.c @@ -1769,7 +1769,8 @@ transform_add_to_multiply (gimple *stmt, vec *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. */