[Bug tree-optimization/50067] [4.7 Regression] Wrong code with -fpredictive-commoning

jakub at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Thu Aug 18 14:14:00 GMT 2011


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50067

--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-08-18 13:38:16 UTC ---
The problem seems to be probably in dr_analyze_indices.  When it is looking at
a[i + 1] or a[i + 2] DR_REF is ARRAY_REF and the computed access_fn is like
{2, +, 1}_1, which means index into a array, while for the MEM_REF[&a + 16B]
accesses the computed access_fn is 16 (i.e. byte index into a array, rather
than
comparable index 4).
So probably the off for the MEM_REF case needs to be divided by the size of the
array entry, the question is what to do with unaligned MEM_REF[&a + 15B] and
similar DR_REFs...



More information about the Gcc-bugs mailing list