------- Comment #6 from jakub at gcc dot gnu dot org 2009-09-30 09:22 ------- For x86-64 we perhaps want further checks for the size optimization - if the scratch register is %r8d through %r15d, 3 byte xorl %r8d, %r8d and e.g. 3 byte movl %r8d, (%rdx) won't be shorter than movl $0, (%rdx) which is 6 bytes). And likely the 2 insns will be slower. But if the address already needs rex prefix, it is still a win.
-- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41505