]> git.ipfire.org Git - thirdparty/gcc.git/commit
Use vec_extact_lo instead of subreg in reduc_<code>_scal_m.
authorliuhongt <hongtao.liu@intel.com>
Tue, 28 Nov 2023 06:46:21 +0000 (14:46 +0800)
committerliuhongt <hongtao.liu@intel.com>
Thu, 30 Nov 2023 07:39:31 +0000 (15:39 +0800)
commita1a3939bea5b0d9cbd3465d96e7e4a5222ae6c48
tree2d54e8442de5de3192c3576f2faa6de058add5db
parenta0905fd7405cd7a1b60c52242a218a52f392b49d
Use vec_extact_lo instead of subreg in reduc_<code>_scal_m.

Loop vectorizer will use vec_perm to select lower part of a vector,
there could be some redundancy when using subreg in
reduc_<code>_scal_m, because rtl cse can't figure out vec_select lower
part is just subreg.

I'm trying to canonicalize vec_select to subreg like aarch64 did, but
there're so many regressions, some are easy to fix, some requires
middle-end adjustment.

So for simplicity, the patch use vec_select instead of subreg in
reduc_<code>_scal_m.

gcc/ChangeLog:

* config/i386/sse.md: (reduc_plus_scal_<mode>): Use
vec_extract_lo instead of subreg.
(reduc_<code>_scal_<mode>): Ditto.
(reduc_<code>_scal_<mode>): Ditto.
(reduc_<code>_scal_<mode>): Ditto.
(reduc_<code>_scal_<mode>): Ditto.
gcc/config/i386/sse.md