+2016-07-11 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/71823
+ * tree-vect-stmts.c (vectorizable_operation): Use vect_get_vec_defs
+ to get vec_oprnds2 from op2.
+
2016-07-11 Uros Bizjak <ubizjak@gmail.com>
* config/i386/predicates.md (x86_64_immediate_operand) <case CONST>:
+2016-07-11 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/71823
+ * gcc.dg/vect/pr71823.c: New test.
+
2016-07-11 David Malcolm <dmalcolm@redhat.com>
* gcc.dg/plugin/location_overflow_plugin.c (plugin_init): Avoid
--- /dev/null
+/* PR tree-optimization/71823 */
+/* { dg-do compile } */
+/* { dg-additional-options "-mfma" { target i?86-*-* x86_64-*-* } } */
+
+float a[4], b[4];
+
+int
+main ()
+{
+ int i;
+ for (i = 0; i < 4; ++i)
+ b[i] = __builtin_fma (1024.0f, 1024.0f, a[i]);
+ return 0;
+}
vect_get_vec_defs (op0, NULL_TREE, stmt, &vec_oprnds0, NULL,
slp_node, -1);
if (op_type == ternary_op)
- {
- vec_oprnds2.create (1);
- vec_oprnds2.quick_push (vect_get_vec_def_for_operand (op2,
- stmt));
- }
+ vect_get_vec_defs (op2, NULL_TREE, stmt, &vec_oprnds2, NULL,
+ slp_node, -1);
}
else
{