This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/52574] [4.6 Regression] gcc tree optimizer generates incorrect vector load instructions for x86_64, app crashes
- From: "deepak.ravi at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 13 Mar 2012 19:18:45 +0000
- Subject: [Bug tree-optimization/52574] [4.6 Regression] gcc tree optimizer generates incorrect vector load instructions for x86_64, app crashes
- Auto-submitted: auto-generated
- References: <bug-52574-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52574
Deepak Ravi <deepak.ravi at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |deepak.ravi at gmail dot
| |com
--- Comment #2 from Deepak Ravi <deepak.ravi at gmail dot com> 2012-03-13 19:18:45 UTC ---
(In reply to comment #1)
> The testcase is invalid C, while x86_64/i?86 will do the expected thing of
> doing unaligned loads/stores silently, it won't do that in vectorized code or
> for atomic accesses.
Shouldn't the compiler vectorize the code _conservatively_, by generating code
to check if the address is aligned or generating unaligned vector load
instructions, as any code written for x86_64 will break with -O3, with newer
gcc.
Also note that, this bug will get triggered only when __restricted is used. If
you remove __restricted, gcc is generating proper code. Also it works properly
for gcc 4.7 too (even with __restricted).