[Bug target/91569] Optimisation test case and unnecessary XOR-OR pair instead of MOV.
pinskia at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Sun Aug 15 22:00:09 GMT 2021
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91569
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Known to work| |11.1.0
--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
For test3 GCC 11+ produces:
opt_test3(int):
.LFB2:
.cfi_startproc
movslq %edi, %rax
movb $4, %ah
ret
Which is exactly what you should see.
Gimple level looks the same between GCC 10 and GCC 11:
_1 = (long int) num_2(D);
a = _1;
MEM[(char *)&a + 1B] = 4;
_6 = a;
I suspect a decl no longer has address taken so it is not going to the stack
right away.
More information about the Gcc-bugs
mailing list