From 88aea79f3cd5933088c99f0ebe3e34285c2b201d Mon Sep 17 00:00:00 2001 From: Kugan Vivekanandarajah Date: Sat, 21 May 2016 07:09:16 +0000 Subject: [PATCH] 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 --- gcc/ChangeLog | 6 ++++++ gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/gcc.dg/tree-ssa/pr71179.c | 10 ++++++++++ gcc/tree-ssa-reassoc.c | 3 ++- 4 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 gcc/testsuite/gcc.dg/tree-ssa/pr71179.c 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. */ -- 2.30.2