The predicate functions called from within the definitions of the memory
constraints (both smalloffset_mem_p and constantpool_mem_p) will return
false if the passed RTX is not MEM, so there is no need to check before-
hand with '(match_code "mem")'.

gcc/ChangeLog:

        * config/xtensa/constraints.md (R, T, U):
        Remove '(match_code "mem")' from the definitions.
---
 gcc/config/xtensa/constraints.md | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/gcc/config/xtensa/constraints.md b/gcc/config/xtensa/constraints.md
index 5cf2f198c5f..d55245a00a5 100644
--- a/gcc/config/xtensa/constraints.md
+++ b/gcc/config/xtensa/constraints.md
@@ -128,15 +128,12 @@
(define_special_memory_constraint "R"
  "Memory that can be accessed with a 4-bit unsigned offset from a register."
- (and (match_code "mem")
-      (match_test "smalloffset_mem_p (op)")))
+ (match_test "smalloffset_mem_p (op)"))
(define_special_memory_constraint "T"
  "Memory in a literal pool (addressable with an L32R instruction)."
- (and (match_code "mem")
-      (match_test "!TARGET_CONST16 && constantpool_mem_p (op)")))
+ (match_test "!TARGET_CONST16 && constantpool_mem_p (op)"))
(define_special_memory_constraint "U"
  "Memory that is not in a literal pool."
- (and (match_code "mem")
-      (match_test "! constantpool_mem_p (op)")))
+ (match_test "! constantpool_mem_p (op)"))
--
2.39.5

Reply via email to