]> git.ipfire.org Git - thirdparty/gcc.git/commit
arm: Fix MVE's vcmp vector-scalar patterns [PR107987]
authorAndre Vieira <andre.simoesdiasvieira@arm.com>
Tue, 6 Dec 2022 12:06:33 +0000 (12:06 +0000)
committerAndre Vieira <andre.simoesdiasvieira@arm.com>
Fri, 27 Jan 2023 12:14:20 +0000 (12:14 +0000)
commit27b6fb155dfefae8dc6ac8d8264851f104dff4e4
tree83b962642c2446c56da69f5596aa97de4be6b4a2
parente8000b7a0244e55f624709022883b1eadf335cf5
arm: Fix MVE's vcmp vector-scalar patterns [PR107987]

This patch surrounds the scalar operand of the MVE vcmp patterns with a
vec_duplicate to ensure both operands of the comparision operator have the same
(vector) mode.

gcc/ChangeLog:

PR target/107987
* config/arm/mve.md (mve_vcmp<mve_cmp_op>q_n_<mode>,
@mve_vcmp<mve_cmp_op>q_n_f<mode>): Apply vec_duplicate to scalar
operand.

gcc/testsuite/ChangeLog:

* gcc.target/arm/mve/pr107987.c: New test.

(cherry picked from commit ed34c3bc3428bce663d42e9eeda10bc0c5d56d5c)
gcc/config/arm/mve.md
gcc/testsuite/gcc.target/arm/mve/pr107987.c [new file with mode: 0644]