public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc(refs/vendors/ARM/heads/morello)] Fix aarch64_simd_{general, nonimmediate}_operand
@ 2022-05-06 14:44 Matthew Malcomson
0 siblings, 0 replies; only message in thread
From: Matthew Malcomson @ 2022-05-06 14:44 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:db879a491ac8c11382702fdec943f99f45395197
commit db879a491ac8c11382702fdec943f99f45395197
Author: Richard Sandiford <richard.sandiford@arm.com>
Date: Tue Apr 26 21:09:50 2022 +0100
Fix aarch64_simd_{general,nonimmediate}_operand
Like aarch64_simd_struct_operand, the uses of
aarch64_simd_general_operand and aarch64_simd_nonimmediate_operand
require a normal-base address.
Diff:
---
gcc/config/aarch64/predicates.md | 8 ++------
gcc/testsuite/gcc.target/aarch64/morello/simd-2.c | 12 ++++++++++++
2 files changed, 14 insertions(+), 6 deletions(-)
diff --git a/gcc/config/aarch64/predicates.md b/gcc/config/aarch64/predicates.md
index ce4e6ee16cb..3e79fbcc572 100644
--- a/gcc/config/aarch64/predicates.md
+++ b/gcc/config/aarch64/predicates.md
@@ -529,16 +529,12 @@
;; Like general_operand but allow only valid SIMD addressing modes.
(define_predicate "aarch64_simd_general_operand"
(and (match_operand 0 "general_operand")
- (match_test "!MEM_P (op)
- || GET_CODE (XEXP (op, 0)) == POST_INC
- || GET_CODE (XEXP (op, 0)) == REG")))
+ (match_test "!MEM_P (op) || aarch64_simd_mem_operand_p (op)")))
;; Like nonimmediate_operand but allow only valid SIMD addressing modes.
(define_predicate "aarch64_simd_nonimmediate_operand"
(and (match_operand 0 "nonimmediate_operand")
- (match_test "!MEM_P (op)
- || GET_CODE (XEXP (op, 0)) == POST_INC
- || GET_CODE (XEXP (op, 0)) == REG")))
+ (match_test "!MEM_P (op) || aarch64_simd_mem_operand_p (op)")))
;; Predicates used by the various SIMD shift operations. These
;; fall in to 3 categories.
diff --git a/gcc/testsuite/gcc.target/aarch64/morello/simd-2.c b/gcc/testsuite/gcc.target/aarch64/morello/simd-2.c
new file mode 100644
index 00000000000..e037a35447d
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/morello/simd-2.c
@@ -0,0 +1,12 @@
+#include <arm_neon.h>
+#include <stdint.h>
+
+int32x4_t f(int32x4_t x, int32_t *__capability ptr) {
+ x[1] = *ptr;
+ return x;
+}
+
+void g(int32_t *__capability ptr, int32x4_t x) {
+ ptr[0] = x[0];
+ ptr[100] = x[1];
+}
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-05-06 14:44 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-06 14:44 [gcc(refs/vendors/ARM/heads/morello)] Fix aarch64_simd_{general, nonimmediate}_operand Matthew Malcomson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).