2018-03-20 Richard Biener <rguenther@suse.de>
PR target/84986
* config/i386/i386.c (ix86_add_stmt_cost): Only cost
sign-conversions as zero, fall back to standard scalar_stmt
cost for the rest.
* gcc.dg/vect/costmodel/x86_64/costmodel-pr84986.c: New testcase.
From-SVN: r258684
+2018-03-20 Richard Biener <rguenther@suse.de>
+
+ PR target/84986
+ * config/i386/i386.c (ix86_add_stmt_cost): Only cost
+ sign-conversions as zero, fall back to standard scalar_stmt
+ cost for the rest.
+
2018-03-20 Martin Liska <mliska@suse.cz>
PR ipa/84825
}
break;
case NOP_EXPR:
- stmt_cost = 0;
+ /* Only sign-conversions are free. */
+ if (tree_nop_conversion_p
+ (TREE_TYPE (gimple_assign_lhs (stmt_info->stmt)),
+ TREE_TYPE (gimple_assign_rhs1 (stmt_info->stmt))))
+ stmt_cost = 0;
break;
case BIT_IOR_EXPR:
+2018-03-20 Richard Biener <rguenther@suse.de>
+
+ PR target/84986
+ * gcc.dg/vect/costmodel/x86_64/costmodel-pr84986.c: New testcase.
+
2018-03-20 Martin Liska <mliska@suse.cz>
PR ipa/84825
--- /dev/null
+/* { dg-do compile } */
+/* { dg-require-effective-target vect_long } */
+
+int N;
+long fn1(void) {
+ short i;
+ long a;
+ i = a = 0;
+ while (i < N)
+ a -= i++;
+ return a;
+}
+
+/* { dg-final { scan-tree-dump "vectorized 1 loops" "vect" } } */