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 c/66194] emit vectorization instruction for not aligned data(amd64), -fno-strict-aliasing not help


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66194

--- Comment #6 from Evgeniy Dushistov <dushistov at mail dot ru> ---
(In reply to Andrew Pinski from comment #5)
> C standard says this is undefined code.

Where? there is two issues aliasing (but I use -fno-strict-aliasing),
and alignment, c99 of course do not mention exact value of "align
requirements",


But from http://www.x86-64.org/documentation/abi.pdf (I think gcc uses it on
amd64):

Like the Intel386 architecture, the AMD64 architecture in general does not
require
all data accesses to be properly aligned. Misaligned data accesses are slower
than aligned accesses but otherwise behave identically.

So I think that with System V AMD64 ABI it is allowed to use int pointer that
not aligned,

and of course this example created for demonstrate misaligned access.

And for example icc not generate code with simd (which cause crash)
instructions for this function.


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