The handling of outer-loop uses of inner-loop definitions assumed
that anything that wasn't a PHI would be a gassign. It's also
possible for it to be a gcall.
2018-08-08 Richard Sandiford <richard.sandiford@arm.com>
gcc/
PR tree-optimization/86871
* tree-vect-stmts.c (vect_transform_stmt): Use gimple_get_lhs
instead of gimple_assign_lhs.
gcc/testsuite/
PR tree-optimization/86871
* gcc.dg/vect/pr86871.c: New test.
From-SVN: r263447
+2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
+
+ PR tree-optimization/86871
+ * tree-vect-stmts.c (vect_transform_stmt): Use gimple_get_lhs
+ instead of gimple_assign_lhs.
+
2018-08-09 Richard Earnshaw <rearnsha@arm.com>
PR target/86887
+2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
+
+ PR tree-optimization/86871
+ * gcc.dg/vect/pr86871.c: New test.
+
2018-08-09 Paolo Carlini <paolo.carlini@oracle.com>
* g++.old-deja/g++.mike/p784.C: Add -fpermissive.
--- /dev/null
+/* { dg-do compile } */
+
+extern int b[];
+extern int c[];
+void g(int f) {
+ for (; f; f++) {
+ int d = 0;
+ for (int e = -1; e <= 1; e++) {
+ int a = f + e;
+ if (a)
+ d = *(c + a);
+ }
+ *(b + f) = d;
+ }
+ }
if (gimple_code (stmt) == GIMPLE_PHI)
scalar_dest = PHI_RESULT (stmt);
else
- scalar_dest = gimple_assign_lhs (stmt);
+ scalar_dest = gimple_get_lhs (stmt);
FOR_EACH_IMM_USE_FAST (use_p, imm_iter, scalar_dest)
if (!flow_bb_inside_loop_p (innerloop, gimple_bb (USE_STMT (use_p))))