------- Comment #1 from jakub at gcc dot gnu dot org  2007-11-07 10:24 -------
With 4.2 and earlier, we get:
        movabsq $578721382704613384, %rax
        movq    %rsp, %rdi
        movq    %rax, (%rsp)
        movq    %rax, 8(%rsp)
        movq    %rax, 16(%rsp)
        movq    %rax, 24(%rsp)
        movq    %rax, 32(%rsp)
        movq    %rax, 40(%rsp)
        movq    %rax, 48(%rsp)
        movq    %rax, 56(%rsp)
        movq    %rax, 64(%rsp)
        movq    %rax, 72(%rsp)
        call    bar
with the trunk:
        movabsq $578721382704613384, %rax
        movabsq $578721382704613384, %r11
        movq    %rax, (%rsp)
        movabsq $578721382704613384, %rax
        movq    %rsp, %rdi
        movq    %rax, 8(%rsp)
        movabsq $578721382704613384, %r10
        movabsq $578721382704613384, %r9
        movabsq $578721382704613384, %r8
        movabsq $578721382704613384, %rsi
        movabsq $578721382704613384, %rcx
        movabsq $578721382704613384, %rdx
        movabsq $578721382704613384, %rax
        movq    %r11, 16(%rsp)
        movq    %r10, 24(%rsp)
        movq    %r9, 32(%rsp)
        movq    %r8, 40(%rsp)
        movq    %rsi, 48(%rsp)
        movq    %rcx, 56(%rsp)
        movq    %rdx, 64(%rsp)
        movq    %rax, 72(%rsp)
        call    bar
which is far worse.  The predicate on the source operand on movdi_1_rex64
allows it (general_operand), but the constraints don't (but letting forwprop to
try all constraints to see what is and is not desirable would be weird). 
Alternatively, perhaps forwprop could try to emit_move_insn and see if it
doesn't create more insns than the one it is substing into, if more than one,
it should just punt, otherwise it can just subst into it.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34012

Reply via email to