Commit d1431192 by Richard Biener Committed by Richard Biener

re PR tree-optimization/70740 (ICE when compiling the Linux kernel (net/wireless/util.o))

2016-04-22  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/70740
	* tree-ssa-phiprop.c (propagate_with_phi): Handle inserted
	VDEF.

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

From-SVN: r235359
parent b8ce3fe2
2016-04-22 Richard Biener <rguenther@suse.de>
PR tree-optimization/70740
* tree-ssa-phiprop.c (propagate_with_phi): Handle inserted
VDEF.
2016-04-21 H.J. Lu <hongjiu.lu@intel.com> 2016-04-21 H.J. Lu <hongjiu.lu@intel.com>
PR target/70750 PR target/70750
......
2016-04-22 Richard Biener <rguenther@suse.de>
PR tree-optimization/70740
* gcc.dg/torture/pr70740.c: New testcase.
2016-04-21 H.J. Lu <hongjiu.lu@intel.com> 2016-04-21 H.J. Lu <hongjiu.lu@intel.com>
PR target/70750 PR target/70750
......
/* { dg-do compile } */
extern int foo (void);
extern void *memcpy (void *, const void *, __SIZE_TYPE__);
struct
{
char a[6];
} d;
struct
{
int a1[0];
int a2[0];
int a3[0];
int a4[];
} a, c;
int b;
int *
bar ()
{
if (b)
return a.a4;
return a.a2;
}
void
baz ()
{
int *e, *f;
if (foo ())
e = c.a3;
else
e = c.a1;
memcpy (d.a, e, 6);
f = bar ();
memcpy (d.a, f, 1);
}
...@@ -327,13 +327,15 @@ propagate_with_phi (basic_block bb, gphi *phi, struct phiprop_d *phivn, ...@@ -327,13 +327,15 @@ propagate_with_phi (basic_block bb, gphi *phi, struct phiprop_d *phivn,
continue; continue;
/* Check if we can move the loads. The def stmt of the virtual use /* Check if we can move the loads. The def stmt of the virtual use
needs to be in a different basic block dominating bb. */ needs to be in a different basic block dominating bb. When the
def is an edge-inserted one we know it dominates us. */
vuse = gimple_vuse (use_stmt); vuse = gimple_vuse (use_stmt);
def_stmt = SSA_NAME_DEF_STMT (vuse); def_stmt = SSA_NAME_DEF_STMT (vuse);
if (!SSA_NAME_IS_DEFAULT_DEF (vuse) if (!SSA_NAME_IS_DEFAULT_DEF (vuse)
&& (gimple_bb (def_stmt) == bb && (gimple_bb (def_stmt) == bb
|| !dominated_by_p (CDI_DOMINATORS, || (gimple_bb (def_stmt)
bb, gimple_bb (def_stmt)))) && !dominated_by_p (CDI_DOMINATORS,
bb, gimple_bb (def_stmt)))))
goto next; goto next;
/* Found a proper dereference with an aggregate copy. Just /* Found a proper dereference with an aggregate copy. Just
......
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