Commit 635684c4 by Bill Schmidt Committed by Richard Biener

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
parent 76afddf3
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
......
......@@ -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;
......
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
......
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
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment