[Bug rtl-optimization/114211] [13 Regression] wrong code with -O -fno-tree-coalesce-vars since r13-1907

ubizjak at gmail dot com gcc-bugzilla@gcc.gnu.org
Tue Mar 5 11:35:05 GMT 2024


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114211

--- Comment #9 from Uroš Bizjak <ubizjak at gmail dot com> ---
Noticed this in passing:

-->     movq    %rcx, %rdx
        addq    v(%rip), %rax
        adcq    v+8(%rip), %rdx
        vmovq   %rax, %xmm1
        vpinsrq $1, %rdx, %xmm1, %xmm0

We could use %rcx instead of %rdx to eliminate the marked move. This is an
artefact of post-reload split of *add<dwi>3_doubleword. The _doubleword
patterns use only general regs, so they could be split before reload as well.
IIRC, there were some minor RA problems with the later approach, but as years
passed and LRA improved, perhaps the split point can be moved before reload.

Something to try (again) for gcc-15. It is just the case of using
ix86_pre_reload_split instead of reload_completed.


More information about the Gcc-bugs mailing list