]> git.ipfire.org Git - thirdparty/gcc.git/commit
i386: Some AVX512 ternlog expansion refinements.
authorRoger Sayle <roger@nextmovesoftware.com>
Fri, 12 Jul 2024 11:30:56 +0000 (12:30 +0100)
committerRoger Sayle <roger@nextmovesoftware.com>
Fri, 12 Jul 2024 11:34:38 +0000 (12:34 +0100)
commit6b5d263f2c90c3e22cdf576970c94bca268c5296
treedb7f97b582f5332f49e569522279c3ceacc7d304
parent56de68aba6cb9cf3022d9e303eec6c6cdb49ad4d
i386: Some AVX512 ternlog expansion refinements.

This patch replaces the calls to force_reg in ix86_expand_ternlog_binop
and ix86_expand_ternlog with gen_reg_rtx and emit_move_insn.
This patch also cleans up whitespace, consistently uses CONST_VECTOR_P
instead of GET_CODE and tweaks checks for ix86_ternlog_leaf_p (for
example where vpandn may take a memory operand).

2024-07-12  Roger Sayle  <roger@nextmovesoftware.com>
    Hongtao Liu  <hongtao.liu@intel.com>

gcc/ChangeLog
* config/i386/i386-expand.cc (ix86_broadcast_from_constant):
Use CONST_VECTOR_P instead of comparison against GET_CODE.
(ix86_gen_bcst_mem): Likewise.
(ix86_ternlog_leaf_p): Likewise.
(ix86_ternlog_operand_p): ix86_ternlog_leaf_p is always true for
vector_all_ones_operand.
(ix86_expand_ternlog_bin_op): Use CONST_VECTOR_P instead of
equality comparison against GET_CODE.  Replace call to force_reg
with gen_reg_rtx and emit_move_insn (for VEC_DUPLICATE broadcast).
Check for !register_operand instead of memory_operand.
Support CONST_VECTORs by calling force_const_mem.
(ix86_expand_ternlog): Fix indentation whitespace.
Allow ix86_ternlog_leaf_p as ix86_expand_ternlog_andnot's second
operand. Use CONST_VECTOR_P instead of equality against GET_CODE.
Use gen_reg_rtx and emit_move_insn for ~a, ~b and ~c cases.
gcc/config/i386/i386-expand.cc