aarch64: Add support for unpacked SVE ABD
authorRichard Sandiford <richard.sandiford@arm.com>
Mon, 11 Jan 2021 18:03:23 +0000 (18:03 +0000)
committerRichard Sandiford <richard.sandiford@arm.com>
Mon, 11 Jan 2021 18:03:23 +0000 (18:03 +0000)
commit907ea3795591b85e2f4cf1c45a4cd8c1bd783892
tree49c9854e3c9031ba64aecb8425b4bc66661a505e
parent3f8b0bba0359419fd453f31519420d6d69fdf710
aarch64: Add support for unpacked SVE ABD

This patch adds support for unpacked SVE SABD and UABD.
It also rewrites the patterns so that they match as combine
patterns without the need for REG_EQUAL notes.  Finally,
there was no pattern for merging with the second input,
which can be handled by reversing the operands.

The type suffix needs to be taken from the element size rather
than the container size.

gcc/
* config/aarch64/aarch64-sve.md (<su>abd<mode>_3): Extend from
SVE_FULL_I to SVE_I.
(*aarch64_cond_<su>abd<mode>_2): Likewise.
(*aarch64_cond_<su>abd<mode>_any): Likewise.
(@aarch64_pred_<su>abd<mode>): Likewise.  Use UNSPEC_PRED_X
for the max and min but not for the minus.
(*aarch64_cond_<su>abd<mode>_3): New pattern.

gcc/testsuite/
* g++.target/aarch64/sve/abd_1.C: New test.
* g++.target/aarch64/sve/cond_abd_1.C: Likewise.
* g++.target/aarch64/sve/cond_abd_2.C: Likewise.
* g++.target/aarch64/sve/cond_abd_3.C: Likewise.
* g++.target/aarch64/sve/cond_abd_4.C: Likewise.
gcc/config/aarch64/aarch64-sve.md
gcc/testsuite/g++.target/aarch64/sve/abd_1.C [new file with mode: 0644]
gcc/testsuite/g++.target/aarch64/sve/cond_abd_1.C [new file with mode: 0644]
gcc/testsuite/g++.target/aarch64/sve/cond_abd_2.C [new file with mode: 0644]
gcc/testsuite/g++.target/aarch64/sve/cond_abd_3.C [new file with mode: 0644]
gcc/testsuite/g++.target/aarch64/sve/cond_abd_4.C [new file with mode: 0644]