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

--- Comment #7 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by H.J. Lu <h...@gcc.gnu.org>:

https://gcc.gnu.org/g:77473a27bae04da99d6979d43e7bd0a8106f4557

commit r16-1694-g77473a27bae04da99d6979d43e7bd0a8106f4557
Author: H.J. Lu <hjl.to...@gmail.com>
Date:   Thu Jun 26 06:08:51 2025 +0800

    x86: Also handle all 1s float vector constant

    Since float vector constant

    (const_vector:V4SF [(const_double:SF -QNaN [-QNaN]) repeated x4])

    is an all 1s float vector constant, update the remove_redundant_vector
    pass to replace

    (insn 20 18 21 2 (set (reg:V4SF 124)
            (const_vector:V4SF [
                    (const_double:SF -QNaN [-QNaN]) repeated x4
                ])) "x.cc":26:5 2426 {movv4sf_internal}
         (nil))

    with

    (insn 49 2 5 2 (set (reg:V16QI 135)
            (const_vector:V16QI [
                    (const_int -1 [0xffffffffffffffff]) repeated x16
                ])) -1
         (nil))
    ...
    (insn 20 18 21 2 (set (reg:V4SF 124)
            (subreg:V4SF (reg:V16QI 135) 0)) "x.cc":26:5 2426
{movv4sf_internal}
         (nil))

    gcc/

            PR target/120819
            * config/i386/i386-features.cc (ix86_broadcast_inner): Also handle
            all 1s float vector constant.

    gcc/testsuite/

            PR target/120819
            * g++.target/i386/pr120819.C: New test.

    Signed-off-by: H.J. Lu <hjl.to...@gmail.com>

Reply via email to