]> git.ipfire.org Git - thirdparty/gcc.git/commit
aarch64: Extend SVE2 bit-select instructions for Neon modes.
authorSoumya AR <soumyaa@nvidia.com>
Wed, 11 Dec 2024 04:02:35 +0000 (09:32 +0530)
committerSoumya AR <soumyaa@nvidia.com>
Wed, 11 Dec 2024 04:02:35 +0000 (09:32 +0530)
commit65b7c8db9c61bcdfd07a3404047dd2d2beac4bbb
tree5d41271bf3d7dcf49cca83d9526bffe6b4fb46e3
parentee2f19b0937b5efc0b23c4319cbd4a38b27eac6e
aarch64: Extend SVE2 bit-select instructions for Neon modes.

NBSL, BSL1N, and BSL2N are bit-select intructions on SVE2 with certain operands
inverted. These can be extended to work with Neon modes.

Since these instructions are unpredicated, duplicate patterns were added with
the predicate removed to generate these instructions for Neon modes.

The patch was bootstrapped and regtested on aarch64-linux-gnu, no regression.

Signed-off-by: Soumya AR <soumyaa@nvidia.com>
gcc/ChangeLog:

* config/aarch64/aarch64-sve2.md
(*aarch64_sve2_nbsl_unpred<mode>): New pattern to match unpredicated
form.
(*aarch64_sve2_bsl1n_unpred<mode>): Likewise.
(*aarch64_sve2_bsl2n_unpred<mode>): Likewise.

gcc/testsuite/ChangeLog:

* gcc.target/aarch64/sve/bitsel.c: New test.
gcc/config/aarch64/aarch64-sve2.md
gcc/testsuite/gcc.target/aarch64/sve/bitsel.c [new file with mode: 0644]