https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64322
Richard Biener <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Last reconfirmed|2014-12-16 00:00:00 |2018-11-19 --- Comment #10 from Richard Biener <rguenth at gcc dot gnu.org> --- (In reply to Martin Liška from comment #9) > Can the bug be marked as resolved? Did you check? At -Os we now produce for A movq $0, -16(%rsp) movl $1, %eax salq $32, %rax movq %rax, -8(%rsp) movq -16(%rsp), %rax xorl %eax, %eax ret that's not folded (the shift). It was worse, yes, but it's not fixed yet.