aarch64: Add support for unpacked SVE mult, max and min
authorRichard Sandiford <richard.sandiford@arm.com>
Mon, 11 Jan 2021 18:03:21 +0000 (18:03 +0000)
committerRichard Sandiford <richard.sandiford@arm.com>
Mon, 11 Jan 2021 18:03:21 +0000 (18:03 +0000)
commit48c7f5b88116c894d76209db0f47216ed5ccd333
tree6e48b19ef56b2d824a6d0dcf7f38fc9d74bbd247
parentb81fbfe1eb5759999c69349d6291d27444585fee
aarch64: Add support for unpacked SVE mult, max and min

This patch makes the SVE_INT_BINARY_IMM patterns support
unpacked arithmetic, covering MUL, SMAX, SMIN, UMAX and UMIN.
For min and max, the type suffix must be taken from the element
size rather than the container size.

The XFAILs are due to PR98602.

gcc/
* config/aarch64/aarch64-sve.md (<SVE_INT_BINARY_IMM:optab><mode>3)
(@aarch64_pred_<SVE_INT_BINARY_IMM:optab><mode>)
(*post_ra_<SVE_INT_BINARY_IMM:optab><mode>3): Extend from SVE_FULL_I
to SVE_I.

gcc/testsuite/
PR testsuite/98602
* g++.target/aarch64/sve/max_1.C: New test.
* g++.target/aarch64/sve/min_1.C: Likewise.
* gcc.target/aarch64/sve/mul_2.c: Likewise.
gcc/config/aarch64/aarch64-sve.md
gcc/testsuite/g++.target/aarch64/sve/max_1.C [new file with mode: 0644]
gcc/testsuite/g++.target/aarch64/sve/min_1.C [new file with mode: 0644]
gcc/testsuite/gcc.target/aarch64/sve/mul_2.c [new file with mode: 0644]