This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/50067] [4.7 Regression] Wrong code with -fpredictive-commoning
- From: "jakub at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 18 Aug 2011 13:38:16 +0000
- Subject: [Bug tree-optimization/50067] [4.7 Regression] Wrong code with -fpredictive-commoning
- Auto-submitted: auto-generated
- References: <bug-50067-4@http.gcc.gnu.org/bugzilla/>
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...