[Bug tree-optimization/82726] ICE in verify_ssa during GIMPLE pass: pcom
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82726 bin cheng changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution|--- |FIXED --- Comment #8 from bin cheng --- Fixed
[Bug tree-optimization/82726] ICE in verify_ssa during GIMPLE pass: pcom
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82726 --- Comment #7 from amker at gcc dot gnu.org --- Author: amker Date: Thu Feb 1 12:00:57 2018 New Revision: 257291 URL: https://gcc.gnu.org/viewcvs?rev=257291=gcc=rev Log: Backport from mainline 2017-11-15 Bin ChengPR tree-optimization/82726 PR tree-optimization/70754 * tree-predcom.c (order_drefs_by_pos): New function. (combine_chains): Move code setting has_max_use_after to... (try_combine_chains): ...here. New parameter. Sort combined chains according to position information. (tree_predictive_commoning_loop): Update call to above function. (update_pos_for_combined_chains, pcom_stmt_dominates_stmt_p): New. testsuite Backport from mainline 2017-11-15 Bin Cheng PR tree-optimization/82726 * gcc.dg/tree-ssa/pr82726.c: New test. Backport from mainline 2017-01-23 Bin Cheng PR tree-optimization/70754 * gfortran.dg/pr70754.f90: New test. Added: branches/gcc-6-branch/gcc/testsuite/gcc.dg/tree-ssa/pr82726.c branches/gcc-6-branch/gcc/testsuite/gfortran.dg/pr70754.f90 Modified: branches/gcc-6-branch/gcc/ChangeLog branches/gcc-6-branch/gcc/testsuite/ChangeLog branches/gcc-6-branch/gcc/tree-predcom.c
[Bug tree-optimization/82726] ICE in verify_ssa during GIMPLE pass: pcom
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82726 --- Comment #6 from amker at gcc dot gnu.org --- Author: amker Date: Tue Dec 19 15:25:56 2017 New Revision: 255828 URL: https://gcc.gnu.org/viewcvs?rev=255828=gcc=rev Log: Backport from mainline 2017-11-15 Bin ChengPR tree-optimization/82726 PR tree-optimization/70754 * tree-predcom.c (order_drefs_by_pos): New function. (combine_chains): Move code setting has_max_use_after to... (try_combine_chains): ...here. New parameter. Sort combined chains according to position information. (tree_predictive_commoning_loop): Update call to above function. (update_pos_for_combined_chains, pcom_stmt_dominates_stmt_p): New. 2017-11-15 Bin Cheng PR tree-optimization/82726 Revert 2017-01-23 Bin Cheng PR tree-optimization/70754 * tree-predcom.c (stmt_combining_refs): New parameter INSERT_BEFORE. (reassociate_to_the_same_stmt): New parameter INSERT_BEFORE. Insert combined stmt before it if not NULL. (combine_chains): Process refs reversely and compute dominance point for root ref. Revert 2017-02-23 Bin Cheng PR tree-optimization/79663 * tree-predcom.c (combine_chains): Process refs in reverse order only for ZERO length chains, and add explaining comment. gcc/testsuite Backport from mainline 2017-11-15 Bin Cheng PR tree-optimization/82726 * gcc.dg/tree-ssa/pr82726.c: New test. Added: branches/gcc-7-branch/gcc/testsuite/gcc.dg/tree-ssa/pr82726.c Modified: branches/gcc-7-branch/gcc/ChangeLog branches/gcc-7-branch/gcc/testsuite/ChangeLog branches/gcc-7-branch/gcc/tree-predcom.c
[Bug tree-optimization/82726] ICE in verify_ssa during GIMPLE pass: pcom
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82726 --- Comment #5 from amker at gcc dot gnu.org --- Author: amker Date: Wed Nov 15 16:20:21 2017 New Revision: 254778 URL: https://gcc.gnu.org/viewcvs?rev=254778=gcc=rev Log: PR tree-optimization/82726 PR tree-optimization/70754 * tree-predcom.c (order_drefs_by_pos): New function. (combine_chains): Move code setting has_max_use_after to... (try_combine_chains): ...here. New parameter. Sort combined chains according to position information. (tree_predictive_commoning_loop): Update call to above function. (update_pos_for_combined_chains, pcom_stmt_dominates_stmt_p): New. gcc/testsuite * gcc.dg/tree-ssa/pr82726.c: New test. Added: trunk/gcc/testsuite/gcc.dg/tree-ssa/pr82726.c Modified: trunk/gcc/ChangeLog trunk/gcc/tree-predcom.c
[Bug tree-optimization/82726] ICE in verify_ssa during GIMPLE pass: pcom
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82726 --- Comment #4 from amker at gcc dot gnu.org --- Author: amker Date: Wed Nov 15 16:16:49 2017 New Revision: 254777 URL: https://gcc.gnu.org/viewcvs?rev=254777=gcc=rev Log: PR tree-optimization/82726 Revert 2017-01-23 Bin ChengPR tree-optimization/70754 * tree-predcom.c (stmt_combining_refs): New parameter INSERT_BEFORE. (reassociate_to_the_same_stmt): New parameter INSERT_BEFORE. Insert combined stmt before it if not NULL. (combine_chains): Process refs reversely and compute dominance point for root ref. Revert 2017-02-23 Bin Cheng PR tree-optimization/79663 * tree-predcom.c (combine_chains): Process refs in reverse order only for ZERO length chains, and add explaining comment. Modified: trunk/gcc/ChangeLog trunk/gcc/tree-predcom.c
[Bug tree-optimization/82726] ICE in verify_ssa during GIMPLE pass: pcom
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82726 --- Comment #3 from amker at gcc dot gnu.org --- Predcom uses below comparison function to make sure references in chain are sorted in lexicographic order. That is, inter-iteration deps are sorted in iteration order; intra-iteration deps are sorted in dominant order. /* Compares two drefs A and B by their offset and position. Callback for qsort. */ static int order_drefs (const void *a, const void *b) { const dref *const da = (const dref *) a; const dref *const db = (const dref *) b; int offcmp = wi::cmps ((*da)->offset, (*db)->offset); if (offcmp != 0) return offcmp; return (*da)->pos - (*db)->pos; } The issue is triggered by re-association of combination, in which re-association position is different to the original reference point. It's wrong to generate/replace re-associated combined reference using order of the original combined chain. Working on a fix.
[Bug tree-optimization/82726] ICE in verify_ssa during GIMPLE pass: pcom
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82726 Richard Biener changed: What|Removed |Added Status|UNCONFIRMED |ASSIGNED Last reconfirmed||2017-10-26 Version|unknown |8.0 Target Milestone|8.0 |--- Ever confirmed|0 |1 --- Comment #2 from Richard Biener --- Confirmed.
[Bug tree-optimization/82726] ICE in verify_ssa during GIMPLE pass: pcom
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82726 --- Comment #1 from amker at gcc dot gnu.org --- I will investigate the issue. It look like related to the pcom re-association stuff. Thanks.
[Bug tree-optimization/82726] ICE in verify_ssa during GIMPLE pass: pcom
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82726 Martin Liška changed: What|Removed |Added Target Milestone|--- |8.0