re PR tree-optimization/71179 (ice fold_convert_loc, at fold-const.c:2360)
authorKugan Vivekanandarajah <kuganv@linaro.org>
Sat, 21 May 2016 07:09:16 +0000 (07:09 +0000)
committerKugan Vivekanandarajah <kugan@gcc.gnu.org>
Sat, 21 May 2016 07:09:16 +0000 (07:09 +0000)
gcc/testsuite/ChangeLog:

2016-05-21  Kugan Vivekanandarajah  <kuganv@linaro.org>

PR middle-end/71179
* gcc.dg/tree-ssa/pr71179.c: New test.

gcc/ChangeLog:

2016-05-21  Kugan Vivekanandarajah  <kuganv@linaro.org>

PR middle-end/71179
* tree-ssa-reassoc.c (transform_add_to_multiply): Disallow float
VECTOR type.

From-SVN: r236554

gcc/ChangeLog
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/tree-ssa/pr71179.c [new file with mode: 0644]
gcc/tree-ssa-reassoc.c

index 8585175482a8260131ed9b47233f3f8a24ebb908..eee44b279723d71f94d8bd1b052a8b9fe97d075e 100644 (file)
@@ -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
index 70354d4e4be523bc1c7dc744f69129363aacda7f..3fc92f10d667ad7be7b0b71f3ca394f35bf64c98 100644 (file)
@@ -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 (file)
index 0000000..885c643
--- /dev/null
@@ -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;
+}
index 81b89777af1212a2fa06b42322b83cebd5f2bb44..3c718e9b20453f5c7b3d6b639e15f502fdd53fa8 100644 (file)
@@ -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.  */