------- Comment #44 from rguenth at gcc dot gnu dot org 2008-04-30 20:29 ------- We are putting the HEAP tag for D.914_385 and wav in the same partition:
<bb 198>: # MPT.501_1171 = PHI <MPT.501_1167(197), MPT.501_1228(199)> # i_25 = PHI <1(197), i_646(199)> D.1264_629 = i_25 + -1; # VUSE <MPT.501_1171> D.1265_630 = wav.data; D.1266_631 = (real(kind=8)[0:] *) D.1265_630; # VUSE <MPT.501_1171> D.1267_632 = wav.dim[0].stride; D.1268_633 = i_25 * D.1267_632; # VUSE <MPT.501_1171> D.1269_634 = wav.dim[1].stride; D.1270_635 = j_28 * D.1269_634; # VUSE <MPT.501_1171> D.1272_637 = wav.dim[2].stride; D.1273_638 = k_29 * D.1272_637; # VUSE <MPT.501_1171> D.1275_640 = wav.offset; D.1271_636 = D.1270_635 + D.1275_640; D.1274_639 = D.1271_636 + D.1273_638; D.1276_641 = D.1274_639 + D.1268_633; # VUSE <dxi_301, zarea_284, SMT.480_250> D.1277_642 = (*D.1266_631)[D.1276_641]; D.1279_644 = D.1277_642 * zarea.64_643; # MPT.501_1228 = VDEF <MPT.501_1171> (*D.914_385)[D.1264_629] = D.1279_644; i_646 = i_25 + 1; if (i_25 == i2_608) A shorter testcase doesn't reproduce this bogus decision even with --param max-aliased-vops=0. LIM should be able to disambiguate here with TBAA. And indeed, the following seems to fix it Index: tree-ssa-loop-im.c =================================================================== --- tree-ssa-loop-im.c (revision 134835) +++ tree-ssa-loop-im.c (working copy) @@ -1640,6 +1640,8 @@ mem_refs_may_alias_p (tree mem1, tree me && SSA_VAR_P (mem1) && !AGGREGATE_TYPE_P (TREE_TYPE (mem1))) return false; + if (!alias_sets_conflict_p (get_alias_set (mem1), get_alias_set (mem2))) + return false; } /* The expansion of addresses may be a bit expensive, thus we only do Pat - can you confirm this? -- rguenth at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- AssignedTo|unassigned at gcc dot gnu |rguenth at gcc dot gnu dot |dot org |org Status|NEW |ASSIGNED Last reconfirmed|2007-10-18 11:45:39 |2008-04-30 20:29:48 date| | http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32921