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

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/953617

Title:
  gcc tree optimizer generates incorrect vector load instructions for
  x86_64

To manage notifications about this bug go to:
https://bugs.launchpad.net/gcc/+bug/953617/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to