[Bug target/123631] Odd choice for vector constant materialization

cvs-commit at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Thu Jan 22 01:09:30 GMT 2026


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

--- Comment #13 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by hongtao Liu <liuhongt@gcc.gnu.org>:

https://gcc.gnu.org/g:1670d0ad2dd1fba510eef6078f3f7fd615fd23a1

commit r16-6964-g1670d0ad2dd1fba510eef6078f3f7fd615fd23a1
Author: liuhongt <hongtao.liu@intel.com>
Date:   Mon Jan 19 00:02:21 2026 -0800

    Add u-arch tune prefer_bcst_from_integer.

    /* X86_TUNE_PREFER_BCST_FROM_INTEGER: Enable broadcast from integer for
       128/256/512-bit vector, if disabled, the move will be done by
       broadcast/load from constant pool

       broadcast from integer:
          mov    $0xa,%eax
          vmovd  %eax,%xmm0
          vpbroadcastd %xmm0,%xmm0

       broadcast/load from constant pool:
          vpbroadcastd CST.0(%rip), %xmm0  */

    The tune is on by default.

    gcc/ChangeLog:

            PR target/123631
            * config/i386/i386-expand.cc (ix86_vector_duplicate_value):
            Don't force CONST_INT to reg !TARGET_PREFER_BCST_FROM_INTEGER,
            force it to mem instead.
            * config/i386/i386.h (TARGET_PREFER_BCST_FROM_INTEGER): New macro.
            * config/i386/x86-tune.def
            (X86_TUNE_PREFER_BCST_FROM_INTEGER): New tune.


More information about the Gcc-bugs mailing list