forked from gcc-mirror/gcc
-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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.
- Loading branch information
1 parent
bcf89f0
commit ed34c3b
Showing
2 changed files
with
17 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
/* { dg-options "-O2" } */ | ||
/* { dg-require-effective-target arm_v8_1m_mve_ok } */ | ||
/* { dg-add-options arm_v8_1m_mve } */ | ||
|
||
#include <arm_mve.h> | ||
|
||
uint32x4_t foo (uint32x4_t a, uint32x4_t b) | ||
{ | ||
mve_pred16_t p = vcmpneq_n_u32 (vandq_u32 (a, b), 0); | ||
return vaddq_x_u32 (a, b, p); | ||
} |