https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116032
Wilco <wilco at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |wilco at gcc dot gnu.org
--- Comment #3 from Wilco <wilco at gcc dot gnu.org> ---
With -O2 I get:
void f(int *p) { p[2] = 1; p[3] = 0; }
vldr d16, .L3
adds r0, r0, #8
vst1.32 {d16}, [r0]
bx lr
With -Os it produces far more efficient code:
movs r2, #1
movs r3, #0
strd r2, r3, [r0, #8]
bx lr
So the test is correct in flagging this as a regression. I imagine this is
particularly bad on old cores or where loading literals from code regions is
expensive.