This is the mail archive of the gcc-help@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]

Re: autovectorization and aligned access


ranjith kumar wrote:
Hi,

Can anyone explain why gcc wont do
autovectorization if the program contains un aligned
acceses?
There are instructions to acceses unaligned acceses.
Instead of exploiting them why gcc produces scalar code??
Vectorization is unlikely to be efficient, unless the loop can be adjusted so that all stores are aligned. Unaligned loads generally aren't as efficient as scalar loads, so you will see scalar loads even in vectorized code. Future CPUs are advertised as having more efficient support for un-aligned data, but gcc is rightly based on current production models.


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