aarch64: Add support for unpacked SVE MULH
authorRichard Sandiford <richard.sandiford@arm.com>
Mon, 11 Jan 2021 18:03:24 +0000 (18:03 +0000)
committerRichard Sandiford <richard.sandiford@arm.com>
Mon, 11 Jan 2021 18:03:24 +0000 (18:03 +0000)
commit7446de5a2af0610d1e12b6583fbfb23e25fa3e1d
treed4e9408450856a4fb8f95c4565fa9cfbdfb8404d
parent907ea3795591b85e2f4cf1c45a4cd8c1bd783892
aarch64: Add support for unpacked SVE MULH

This patch extends the SMULH and UMULH support to unpacked vectors.
The type suffix must be taken from the element size rather than the
container size.

The main use of these patterns is to support division and modulus
by a constant.  The conditional forms would be hard to trigger from
non-ACLE code, and ACLE code needs fully-packed vectors only.

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

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