@@ -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;
+}
@@ -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. */