]> gcc.gnu.org Git - gcc.git/commit
[1/4] aarch64: Convert UABDL and SABDL patterns to standard RTL codes
authorKyrylo Tkachov <kyrylo.tkachov@arm.com>
Mon, 24 Apr 2023 08:41:42 +0000 (09:41 +0100)
committerKyrylo Tkachov <kyrylo.tkachov@arm.com>
Mon, 24 Apr 2023 08:41:42 +0000 (09:41 +0100)
commitc60654918bc14c3d8fe04d3e7c3aa9daee0a3820
tree02635a70e61a8a390478dc5e0e751139956cf33e
parent6ec565d8755afe1c187cda69fb8e478e669cfd02
[1/4] aarch64: Convert UABDL and SABDL patterns to standard RTL codes

This is the first patch in a series to improve the RTL representation of the sum-of-absolute-differences patterns
in the backend. We can use standard RTL codes and remove some unspecs.
For UABDL and SABDL we have a widening of the result so we can represent uabdl (x, y) as (zero_extend (minus (smax (x, y) (smin (x, y)))))
and sabdl (x, y) as (zero_extend (minus (umax (x, y) (umin (x, y))))).
It is important to use zero_extend rather than sign_extend for the sabdl case, as the result of the absolute difference is still a positive unsigned value
(the signedness of the operation refers to the values being diffed, not the absolute value of the difference) that must be zero-extended.

Bootstrapped and tested on aarch64-none-linux-gnu (these intrinsics are reasonably well-covered by the advsimd-intrinsics.exp tests)

gcc/ChangeLog:

* config/aarch64/aarch64-simd.md (aarch64_<sur>abdl<mode>): Rename to...
(aarch64_<su>abdl<mode>): ... This.  Use standard RTL ops instead of
unspec.
* config/aarch64/aarch64.md (UNSPEC_SABDL, UNSPEC_UABDL): Delete.
* config/aarch64/iterators.md (ABDL): Delete.
(sur): Remove handling of UNSPEC_SABDL and UNSPEC_UABDL.
gcc/config/aarch64/aarch64-simd.md
gcc/config/aarch64/aarch64.md
gcc/config/aarch64/iterators.md
This page took 0.062595 seconds and 6 git commands to generate.