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

--- Comment #14 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Venkataramanan Kumar
<[email protected]>:

https://gcc.gnu.org/g:dbc6b5266eb17638ca1d5b22ab35364e0b2e0d48

commit r17-1768-gdbc6b5266eb17638ca1d5b22ab35364e0b2e0d48
Author: Sarvesh Chandra <[email protected]>
Date:   Tue Jun 23 12:20:01 2026 +0530

    i386: Emit vunpcklpd for register V4DF/V8DF movddup [PR107057]

    The avx512f_movddup512 and avx_movddup256 patterns only accepted a
    memory source operand, so an even-lane duplicate of a value already in
    a register forced that register to be spilled to the stack and
    reloaded with vmovddup.

    Add a register source alternative that emits vunpcklpd, which performs
    the same even-lane interleave directly on a register operand.  A
    genuine memory source still selects vmovddup.

    The register alternative duplicates a single source operand
    (vunpcklpd %1, %1, %0), so it is typed sselog1, the single-source SSE
    logical type, while the memory alternative keeps ssemov.

    gcc/ChangeLog:

            PR target/107057
            * config/i386/sse.md (avx512f_movddup512<mask_name>): Add a
            register source alternative that emits vunpcklpd.
            (avx_movddup256<mask_name>): Likewise.

    gcc/testsuite/ChangeLog:

            PR target/107057
            * gcc.target/i386/avx512-movedup.c: New test.

    Co-authored-by: Ashwin Godbole <[email protected]>
    Signed-off-by: Sarvesh Chandra <[email protected]>

Reply via email to