This patch fixes PR5124 (memset inline-code threshold dubiously high).
If memset is expanded inline and the memset value is constant, code generator created sequence of instructions 'mov imm, mem', like:
movl $0x0,0x4(%esi) movl $0x0,0x8(%esi)
With this patch the memset value is put into register and then instructions 'mov reg, mem' are used:
movl %eax,0x4(%esi) movl %eax,0x8(%esi)
It is profitable for both speed and code size, gcc and icc expand memset in this way.
Could you please review the patch?
Thank you.