]> git.ipfire.org Git - thirdparty/gcc.git/commit
rs6000: Eliminate zext fed by vclzlsbb [PR111480]
authorKewen Lin <linkw@linux.ibm.com>
Wed, 10 Jan 2024 05:06:13 +0000 (23:06 -0600)
committerKewen Lin <linkw@linux.ibm.com>
Wed, 10 Jan 2024 05:06:13 +0000 (23:06 -0600)
commit6660904c3f5872262f466b5cbbd48fb11e9fe966
tree11ad044d7b3d4a22050541e7adba1643a8bcc02f
parentcf5f6a048e376ab0d2f7bc283c158605e1166061
rs6000: Eliminate zext fed by vclzlsbb [PR111480]

As PR111480 shows, commit r14-4079 only optimizes the case
of vctzlsbb but not for the similar vclzlsbb.  This patch
is to consider vclzlsbb as well and avoid the failure on
the reported test case.  It also simplifies the patterns
with iterator and attribute.

PR target/111480

gcc/ChangeLog:

* config/rs6000/vsx.md (VCZLSBB): New int iterator.
(vczlsbb_char): New int attribute.
(vclzlsbb_<mode>, vctzlsbb_<mode>): Merge to ...
(vc<vczlsbb_char>zlsbb_<mode>): ... this.
(*vctzlsbb_zext_<mode>): Rename to ...
(*vc<vczlsbb_char>zlsbb_zext_<mode>): ... this, and extend it to
cover vclzlsbb.
gcc/config/rs6000/vsx.md