diff options
author | liuhongt <hongtao.liu@intel.com> | 2023-03-21 13:35:06 +0800 |
---|---|---|
committer | liuhongt <hongtao.liu@intel.com> | 2023-05-06 09:01:18 +0800 |
commit | 23b60aeb006182f2a1af8a3cdbfc7ac90a29fb78 (patch) | |
tree | 5975c26afaa6e37c899bb789a1dd3a41e5a13a9d /gcc/cp/constexpr.cc | |
parent | 82aef047eda376f41eccf51ba1277e46160f6420 (diff) | |
download | gcc-23b60aeb006182f2a1af8a3cdbfc7ac90a29fb78.zip gcc-23b60aeb006182f2a1af8a3cdbfc7ac90a29fb78.tar.gz gcc-23b60aeb006182f2a1af8a3cdbfc7ac90a29fb78.tar.bz2 |
Canonicalize vec_merge when mask is constant.
Use swap_communattive_operands_p for canonicalization. When both value
has same operand precedence value, then first bit in the mask should
select first operand.
The canonicalization should help backends for pattern match. .i.e. x86
backend has lots of vec_merge patterns, combine will create any form
of vec_merge(mask, or inverted mask), then backend need to add 2
patterns to match exact 1 instruction. The canonicalization can
simplify 2 patterns to 1.
gcc/ChangeLog:
* combine.cc (maybe_swap_commutative_operands): Canonicalize
vec_merge when mask is constant.
* doc/md.texi: Document vec_merge canonicalization.
Diffstat (limited to 'gcc/cp/constexpr.cc')
0 files changed, 0 insertions, 0 deletions