[Bug middle-end/67790] [6 Regression] verify_ssa failed: definition in block 20 follows the use
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67790 Marek Polacek changed: What|Removed |Added CC||mpolacek at gcc dot gnu.org Target Milestone|--- |6.0 Summary|verify_ssa failed: |[6 Regression] verify_ssa |definition in block 20 |failed: definition in block |follows the use |20 follows the use --- Comment #2 from Marek Polacek --- Started with r222354.
[Bug middle-end/67790] [6 Regression] verify_ssa failed: definition in block 20 follows the use
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67790 Richard Biener changed: What|Removed |Added Status|NEW |ASSIGNED Assignee|unassigned at gcc dot gnu.org |rguenth at gcc dot gnu.org --- Comment #3 from Richard Biener --- Mine.
[Bug middle-end/67790] [6 Regression] verify_ssa failed: definition in block 20 follows the use
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67790 --- Comment #4 from Richard Biener --- The issue here is that /* If we detected "res -= x[i]" earlier, rewrite it into "res += -x[i]" now. If this turns out to be useless reassoc will clean it up again. */ if (orig_code == MINUS_EXPR) { tree rhs = gimple_assign_rhs2 (def_stmt); tree negrhs = make_ssa_name (TREE_TYPE (rhs)); gimple *negate_stmt = gimple_build_assign (negrhs, NEGATE_EXPR, rhs); gimple_stmt_iterator gsi = gsi_for_stmt (def_stmt); set_vinfo_for_stmt (negate_stmt, new_stmt_vec_info (negate_stmt, loop_info)); gsi_insert_before (&gsi, negate_stmt, GSI_NEW_STMT); gimple_assign_set_rhs2 (def_stmt, negrhs); gimple_assign_set_rhs_code (def_stmt, PLUS_EXPR); update_stmt (def_stmt); } actually inserts stmts into the IL which assigns UIDs to them (via set_vinfo_for_stmt) which later confuses get_later/earlier_stmt. The "proper" way of doing the above is by using a pattern which avoids this issue.
[Bug middle-end/67790] [6 Regression] verify_ssa failed: definition in block 20 follows the use
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67790 --- Comment #5 from Richard Biener --- Aww. And then I'm running into the issue of pattern recog / reduction analysis ordering which has caused me headaches before... maybe time to (finally) fix that.
[Bug middle-end/67790] [6 Regression] verify_ssa failed: definition in block 20 follows the use
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67790 --- Comment #6 from Richard Biener --- Author: rguenth Date: Wed Nov 18 08:31:32 2015 New Revision: 230518 URL: https://gcc.gnu.org/viewcvs?rev=230518&root=gcc&view=rev Log: 2015-11-18 Richard Biener PR tree-optimization/67790 * tree-vect-loop.c (vect_is_simple_reduction_1): Remove IL rewrite for MINUS_EXPR reductions, rename back to ... (vect_is_simple_reduction): ... this, removing the wrapper. (vect_force_simple_reduction): Adjust. (vectorizable_reduction): Adjust reduc_index for MINUS_EXPR reductions and make use if reduc_index in all places. For the final reduction of MINUS_EXPR use PLUS_EXPR. * gcc.dg/vect/pr67790.c: New testcase. Added: trunk/gcc/testsuite/gcc.dg/vect/pr67790.c Modified: trunk/gcc/ChangeLog trunk/gcc/testsuite/ChangeLog trunk/gcc/tree-vect-loop.c
[Bug middle-end/67790] [6 Regression] verify_ssa failed: definition in block 20 follows the use
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67790 Richard Biener changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution|--- |FIXED --- Comment #7 from Richard Biener --- Fixed.