This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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...


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]