diff options
author | Bill Schmidt <wschmidt@linux.vnet.ibm.com> | 2017-03-24 12:34:19 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2017-03-24 12:34:19 +0000 |
commit | 635684c4cf2c3672017cda0df400213b0ca2d10b (patch) | |
tree | d382d78d79d1cc23614ac44897d54c00113ca88a /gcc | |
parent | 76afddf36b915170493dfd0c1f28bb85bec808ad (diff) | |
download | gcc-635684c4cf2c3672017cda0df400213b0ca2d10b.zip gcc-635684c4cf2c3672017cda0df400213b0ca2d10b.tar.gz gcc-635684c4cf2c3672017cda0df400213b0ca2d10b.tar.bz2 |
re PR tree-optimization/80158 (ICE in all_phi_incrs_profitable)
2017-03-24 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
PR tree-optimization/80158
* gimple-ssa-strength-reduction.c (replace_mult_candidate): When
replacing a candidate statement, also replace it for the
candidate's alternate interpretation.
(replace_rhs_if_not_dup): Likewise.
(replace_one_candidate): Likewise.
* gfortran.fortran-torture/compile/pr80158.f: New file.
From-SVN: r246439
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 9 | ||||
-rw-r--r-- | gcc/gimple-ssa-strength-reduction.c | 12 | ||||
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/gfortran.fortran-torture/compile/pr80158.f | 16 |
4 files changed, 42 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index de9cd90..8d4adfb 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,12 @@ +2017-03-24 Bill Schmidt <wschmidt@linux.vnet.ibm.com> + + PR tree-optimization/80158 + * gimple-ssa-strength-reduction.c (replace_mult_candidate): When + replacing a candidate statement, also replace it for the + candidate's alternate interpretation. + (replace_rhs_if_not_dup): Likewise. + (replace_one_candidate): Likewise. + 2017-03-24 Richard Biener <rguenther@suse.de> PR tree-optimization/80167 diff --git a/gcc/gimple-ssa-strength-reduction.c b/gcc/gimple-ssa-strength-reduction.c index ca154c5..99978dd 100644 --- a/gcc/gimple-ssa-strength-reduction.c +++ b/gcc/gimple-ssa-strength-reduction.c @@ -2089,6 +2089,8 @@ replace_mult_candidate (slsr_cand_t c, tree basis_name, widest_int bump) gimple_set_location (copy_stmt, gimple_location (c->cand_stmt)); gsi_replace (&gsi, copy_stmt, false); c->cand_stmt = copy_stmt; + if (c->next_interp) + lookup_cand (c->next_interp)->cand_stmt = copy_stmt; if (dump_file && (dump_flags & TDF_DETAILS)) stmt_to_print = copy_stmt; } @@ -2118,6 +2120,8 @@ replace_mult_candidate (slsr_cand_t c, tree basis_name, widest_int bump) basis_name, bump_tree); update_stmt (gsi_stmt (gsi)); c->cand_stmt = gsi_stmt (gsi); + if (c->next_interp) + lookup_cand (c->next_interp)->cand_stmt = gsi_stmt (gsi); if (dump_file && (dump_flags & TDF_DETAILS)) stmt_to_print = gsi_stmt (gsi); } @@ -3405,6 +3409,8 @@ replace_rhs_if_not_dup (enum tree_code new_code, tree new_rhs1, tree new_rhs2, gimple_assign_set_rhs_with_ops (&gsi, new_code, new_rhs1, new_rhs2); update_stmt (gsi_stmt (gsi)); c->cand_stmt = gsi_stmt (gsi); + if (c->next_interp) + lookup_cand (c->next_interp)->cand_stmt = gsi_stmt (gsi); if (dump_file && (dump_flags & TDF_DETAILS)) return gsi_stmt (gsi); @@ -3511,6 +3517,8 @@ replace_one_candidate (slsr_cand_t c, unsigned i, tree basis_name) gimple_assign_set_rhs_with_ops (&gsi, MINUS_EXPR, basis_name, rhs2); update_stmt (gsi_stmt (gsi)); c->cand_stmt = gsi_stmt (gsi); + if (c->next_interp) + lookup_cand (c->next_interp)->cand_stmt = gsi_stmt (gsi); if (dump_file && (dump_flags & TDF_DETAILS)) stmt_to_print = gsi_stmt (gsi); @@ -3532,6 +3540,8 @@ replace_one_candidate (slsr_cand_t c, unsigned i, tree basis_name) gimple_set_location (copy_stmt, gimple_location (c->cand_stmt)); gsi_replace (&gsi, copy_stmt, false); c->cand_stmt = copy_stmt; + if (c->next_interp) + lookup_cand (c->next_interp)->cand_stmt = copy_stmt; if (dump_file && (dump_flags & TDF_DETAILS)) stmt_to_print = copy_stmt; @@ -3543,6 +3553,8 @@ replace_one_candidate (slsr_cand_t c, unsigned i, tree basis_name) gimple_set_location (cast_stmt, gimple_location (c->cand_stmt)); gsi_replace (&gsi, cast_stmt, false); c->cand_stmt = cast_stmt; + if (c->next_interp) + lookup_cand (c->next_interp)->cand_stmt = cast_stmt; if (dump_file && (dump_flags & TDF_DETAILS)) stmt_to_print = cast_stmt; diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 78de19e..759d2b3 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2017-03-24 Bill Schmidt <wschmidt@linux.vnet.ibm.com> + + PR tree-optimization/80158 + * gfortran.fortran-torture/compile/pr80158.f: New file. + 2017-03-24 Richard Biener <rguenther@suse.de> PR tree-optimization/80167 diff --git a/gcc/testsuite/gfortran.fortran-torture/compile/pr80158.f b/gcc/testsuite/gfortran.fortran-torture/compile/pr80158.f new file mode 100644 index 0000000..5e3b3f2 --- /dev/null +++ b/gcc/testsuite/gfortran.fortran-torture/compile/pr80158.f @@ -0,0 +1,16 @@ + SUBROUTINE DRPAUL(SMAT,TMAT,EPS,EPT,SIJ,TIJ,WRK,VEC,ARRAY,FMO, + * XMKVIR,TMJ,XMI,YMI,ZMI,ZQQ,L1,L1EF,LNA,LNA2, + * NAEF,L2,NLOC,NVIR,PROVEC,FOCKMA,MXBF,MXMO2) + DIMENSION CMO(L1,L1),TLOC(LNA,LNA),SMJ(L1,NAEF),XMK(L1,LNA) + DO I = 1,LNA + DO J = 1,LNA + IF (I.LE.NOUT) TLOC(I,J) = ZERO + IF (J.LE.NOUT) TLOC(I,J) = ZERO + END DO + DO NA=1,NOC + IF ( ABS(E(NI)-E(NA)) .GE.TOL) THEN + END IF + END DO + END DO + END + |