]> git.ipfire.org Git - thirdparty/gcc.git/commit
AArch64: correct dot-product RTL patterns for aarch64.
authorTamar Christina <tamar.christina@arm.com>
Mon, 26 Jul 2021 09:23:21 +0000 (10:23 +0100)
committerTamar Christina <tamar.christina@arm.com>
Mon, 26 Jul 2021 09:23:21 +0000 (10:23 +0100)
commit1ab2270036dc0f2a13442ce682267bc7433ffb34
tree4ad12bccc165ec641db1d0c97d99193450fec9ad
parent2050ac1a547eebe7de4af98b57429a934e75fff4
AArch64: correct dot-product RTL patterns for aarch64.

The previous fix for this problem was wrong due to a subtle difference between
where NEON expects the RMW values and where intrinsics expects them.

The insn pattern is modeled after the intrinsics and so needs an expand for
the vectorizer optab to switch the RTL.

However operand[3] is not expected to be written to so the current pattern is
bogus.

Instead I rewrite the RTL to be in canonical ordering and merge them.

gcc/ChangeLog:

* config/aarch64/aarch64-simd-builtins.def (sdot, udot): Rename to..
(sdot_prod, udot_prod): ... This.
* config/aarch64/aarch64-simd.md (aarch64_<sur>dot<vsi2qi>): Merged
into...
(<sur>dot_prod<vsi2qi>): ... this.
(aarch64_<sur>dot_lane<vsi2qi>, aarch64_<sur>dot_laneq<vsi2qi>):
Change operands order.
(<sur>sadv16qi): Use new operands order.
* config/aarch64/arm_neon.h (vdot_u32, vdotq_u32, vdot_s32,
vdotq_s32): Use new RTL ordering.
gcc/config/aarch64/aarch64-simd-builtins.def
gcc/config/aarch64/aarch64-simd.md
gcc/config/aarch64/arm_neon.h