re PR tree-optimization/81083 (ICE: Unable to coalesce ssa_names 4 and 13 which are marked as MUST COALESCE)

2017-06-14  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/81083
	* tree-ssa-sccvn.c (vn_reference_lookup_3): Do not use abnormals
	as values.

	* gcc.dg/torture/pr81083.c: New testcase.

From-SVN: r249182
This commit is contained in:
Richard Biener 2017-06-14 07:22:32 +00:00 committed by Richard Biener
parent 6aa397703c
commit 24d020bd46
4 changed files with 27 additions and 1 deletions

View File

@ -1,3 +1,9 @@
2017-06-14 Richard Biener <rguenther@suse.de>
PR tree-optimization/81083
* tree-ssa-sccvn.c (vn_reference_lookup_3): Do not use abnormals
as values.
2017-06-13 Segher Boessenkool <segher@kernel.crashing.org> 2017-06-13 Segher Boessenkool <segher@kernel.crashing.org>
* config/rs6000/rs6000.c: Update all comments that mentioned SPE. * config/rs6000/rs6000.c: Update all comments that mentioned SPE.

View File

@ -1,3 +1,8 @@
2017-06-14 Richard Biener <rguenther@suse.de>
PR tree-optimization/81083
* gcc.dg/torture/pr81083.c: New testcase.
2017-06-14 Jakub Jelinek <jakub@redhat.com> 2017-06-14 Jakub Jelinek <jakub@redhat.com>
* gcc.dg/tree-ssa/vrp101.c: Fix scan-tree-dump regex. * gcc.dg/tree-ssa/vrp101.c: Fix scan-tree-dump regex.

View File

@ -0,0 +1,13 @@
/* { dg-do compile } */
void a(int arg)
{
extern struct { int x; } obj;
setjmp();
obj.x = arg;
arg = arg;
if (obj.x)
func();
if (obj.x)
func();
}

View File

@ -2035,7 +2035,9 @@ vn_reference_lookup_3 (ao_ref *ref, tree vuse, void *vr_,
ops[1] = bitsize_int (ref->size); ops[1] = bitsize_int (ref->size);
ops[2] = bitsize_int (offset - offset2); ops[2] = bitsize_int (offset - offset2);
tree val = vn_nary_build_or_lookup (rcode, vr->type, ops); tree val = vn_nary_build_or_lookup (rcode, vr->type, ops);
if (val) if (val
&& (TREE_CODE (val) != SSA_NAME
|| ! SSA_NAME_OCCURS_IN_ABNORMAL_PHI (val)))
{ {
vn_reference_t res = vn_reference_lookup_or_insert_for_pieces vn_reference_t res = vn_reference_lookup_or_insert_for_pieces
(vuse, vr->set, vr->type, vr->operands, val); (vuse, vr->set, vr->type, vr->operands, val);