The pass scans machine instructions looking for uses of immediate
values. If the same value is used in neighbouring instructions, it
is moved to a register, if this is possible and reduces code size.
For instance, instructions
mov $0, 0x4(%esi) mov $0, 0x8(%esi)
can be replaced by
mov $0, %eax mov %eax, 0x4(%esi) mov %eax, 0x8(%esi)
which is shorter in code size.
This patch fixes PR5124, it uses feedback on the previous patch discussed in the thread