Commit 85004cb2 by Richard Biener Committed by Richard Biener

re PR tree-optimization/87217 (ICE in in check_loop_closed_ssa_def, at…

re PR tree-optimization/87217 (ICE in in check_loop_closed_ssa_def, at tree-ssa-loop-manip.c:709 when compiling SPEC2000 starting with r264069)

2018-09-05  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/87217
	* tree-ssa-sccvn.c (vuse_valueize): New.
	(vn_reference_lookup_pieces): Use it.
	(vn_reference_lookup): Likewise.

	* gfortran.dg/pr87217.f: New testcase.

From-SVN: r264121
parent a7987858
2018-09-05 Richard Biener <rguenther@suse.de>
PR tree-optimization/87217
* tree-ssa-sccvn.c (vuse_valueize): New.
(vn_reference_lookup_pieces): Use it.
(vn_reference_lookup): Likewise.
2018-09-05 Nathan Sidwell <nathan@acm.org> 2018-09-05 Nathan Sidwell <nathan@acm.org>
PR c++/87137 PR c++/87137
......
2018-09-05 Richard Biener <rguenther@suse.de>
PR tree-optimization/87217
* gfortran.dg/pr87217.f: New testcase.
2018-09-05 Pádraig Brady p@draigbrady.com 2018-09-05 Pádraig Brady p@draigbrady.com
PR c++/87137 PR c++/87137
......
! { dg-do compile }
! { dg-options "-O3" }
implicit real*8 (a-h,o-z)
common clop6(3),dps(6),aml6(6,6)
dimension y1(3)
dimension dclo(3)
dimension dx(3),dy(3)
save
do 80 ii=1,itco
y1(3)=dps(1)
do 40 l=1,3
dy(l)=clop6(l)-y1(l)
40 continue
dczp=abs(dy(3))
if(dcx.le.c1m10.and.dcz.le.c1m10.and.dcxp.le.c1m10.and.dczp
+ .le.c1m10.and.dcy.le.c1m10.and.dcyp.le.c1m10) goto 90
80 continue
write(6) itco
ii=itco
90 continue
if(ii.ne.itco) then
do 65 k=1,3
do 55 j=1,3
jj=2*j
kk=2*k
dclo(k)=aml6(kk-1,jj-1)*dx(j)+dclo(k)
dclo(k)=aml6(kk-1,jj)*dy(j)+dclo(k)
55 continue
65 continue
endif
end
...@@ -493,6 +493,25 @@ vuse_ssa_val (tree x) ...@@ -493,6 +493,25 @@ vuse_ssa_val (tree x)
return x; return x;
} }
/* Similar to the above but used as callback for walk_non_aliases_vuses
and thus should stop at unvisited VUSE to not walk across region
boundaries. */
static tree
vuse_valueize (tree vuse)
{
do
{
bool visited;
vuse = SSA_VAL (vuse, &visited);
if (!visited)
return NULL_TREE;
gcc_assert (vuse != VN_TOP);
}
while (SSA_NAME_IN_FREE_LIST (vuse));
return vuse;
}
/* Return the vn_kind the expression computed by the stmt should be /* Return the vn_kind the expression computed by the stmt should be
associated with. */ associated with. */
...@@ -2573,7 +2592,7 @@ vn_reference_lookup_pieces (tree vuse, alias_set_type set, tree type, ...@@ -2573,7 +2592,7 @@ vn_reference_lookup_pieces (tree vuse, alias_set_type set, tree type,
(vn_reference_t)walk_non_aliased_vuses (&r, vr1.vuse, (vn_reference_t)walk_non_aliased_vuses (&r, vr1.vuse,
vn_reference_lookup_2, vn_reference_lookup_2,
vn_reference_lookup_3, vn_reference_lookup_3,
vuse_ssa_val, &vr1); vuse_valueize, &vr1);
gcc_checking_assert (vr1.operands == shared_lookup_references); gcc_checking_assert (vr1.operands == shared_lookup_references);
} }
...@@ -2629,7 +2648,7 @@ vn_reference_lookup (tree op, tree vuse, vn_lookup_kind kind, ...@@ -2629,7 +2648,7 @@ vn_reference_lookup (tree op, tree vuse, vn_lookup_kind kind,
(vn_reference_t)walk_non_aliased_vuses (&r, vr1.vuse, (vn_reference_t)walk_non_aliased_vuses (&r, vr1.vuse,
vn_reference_lookup_2, vn_reference_lookup_2,
vn_reference_lookup_3, vn_reference_lookup_3,
vuse_ssa_val, &vr1); vuse_valueize, &vr1);
gcc_checking_assert (vr1.operands == shared_lookup_references); gcc_checking_assert (vr1.operands == shared_lookup_references);
if (wvnresult) if (wvnresult)
{ {
......
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