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

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

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

commit r17-226-gb81218009e091e92145a3fc54971fbbdb82d7298
Author: H.J. Lu <[email protected]>
Date:   Wed Apr 29 19:50:38 2026 +0800

    x86_cse: Convert CONST_VECTOR load to constant integer load

    Convert CONST_VECTOR load no larger than integer register:

      (set (reg:V2SI 106)
           (const_vector:V2SI [(const_int 1 [1]) repeated x2]))

    to constant integer load:

      (set (subreg:DI (reg:V2SI 106 [ _20 ]) 0)
           (const_int 4294967297 [0x100000001]))

    and keep redundant constant integer load.  Generate zero CONST_VECTOR
    load which works for both MMX and XMM registers.

    Tested on Linux/x86-64 and Linux/i686.

    gcc/

            PR target/125026
            PR target/125032
            * config/i386/i386-features.cc (ix86_place_single_vector_set):
            Don't check CONST_VECTOR load size.
            (replace_vector_const): Handle constant integer load.
            (x86_cse::x86_cse): Convert CONST_VECTOR load no larger than
            integer to constant integer load and keep redundant constant
            integer load.  Generate zero CONST_VECTOR load.

    gcc/testsuite/

            PR target/125026
            PR target/125032
            * gcc.target/i386/pr125026.c: New test.
            * gcc.target/i386/pr125032-1.c: Likewise.
            * gcc.target/i386/pr125032-2.c: Likewise.

    Signed-off-by: H.J. Lu <[email protected]>
  • [Bug target/125026] [17 regress... cvs-commit at gcc dot gnu.org via Gcc-bugs

Reply via email to