GCC 12.1 Released
GCC 12.1 Released
Posted May 8, 2022 18:31 UTC (Sun) by hmh (subscriber, #3838)In reply to: GCC 12.1 Released by pbonzini
Parent article: GCC 12.1 Released
GCC used to switch from (non-vector) instructions that tolerate unaligned access to (vector) instructions that forbid it when autovectorizing for x86 targets. Even when there were alternative (slower?) vector instructions that would tolerate unaligned access.
This is going to expose bad source code that relied on UB related to unaligned access and was therefore not compatible with autovectorizaton on x86, but did not disable it explicitly and instead depended on -O2 to not enable autovectorizaton.
Since it triggers at runtime, I foresee some "explicitly disable vectorization on anything using -O2" CFLAGS patching in the future...
