[PATCH] Make alias_sets_conflict_p less conservative

Richard Guenther rguenther@suse.de
Wed Mar 5 14:10:00 GMT 2008


On Wed, 5 Mar 2008, Richard Guenther wrote:

> The patch bootstrapped fine with a single failure,
> 
> FAIL: gcc.c-torture/execute/20071219-1.c execution
> 
> where it looks we get things right on the tree level but break it
> on the RTL level.  (It's test3 () that is broken, from a quick
> look we DSE *p = a; which of course is wrong as p points to b)

We break it at tree level already, a tree-level DSE bug is exposed
by this change (PR35472).  We go from (before the patch)

  # VUSE <p_16>
  p.3_1 = p;
  # p_20 = VDEF <p_16>
  # a_21 = VDEF <a_17>
  # b_22 = VDEF <b_18>
  # SMT.29_23 = VDEF <SMT.29_19>
  *p.3_1 = a;
  # VUSE <p_20>
  p.3_2 = p;
  # p_24 = VDEF <p_20>
  # a_25 = VDEF <a_21>
  # b_26 = VDEF <b_22>
  # SMT.29_27 = VDEF <SMT.29_23>
  *p.3_2 = b;

(note how the store to *p wrongly affects p itself, and thus we store
to two different pointer SSA_NAMEs)

to (after the patch)

  # VUSE <p_16>
  p.3_1 = p;
  # a_20 = VDEF <a_17>
  # b_21 = VDEF <b_18>
  # SMT.29_22 = VDEF <SMT.29_19>
  *p.3_1 = a; 
  # a_23 = VDEF <a_20>
  # b_24 = VDEF <b_21>
  # SMT.29_25 = VDEF <SMT.29_22>
  *p.3_1 = b; 

where DSE now wrongly decides to delete the *p.3_1 = a; store.

Richard.



More information about the Gcc-patches mailing list