]> gcc.gnu.org Git - gcc.git/commitdiff
rs6000: New predicate any_memory_operand
authorSegher Boessenkool <segher@kernel.crashing.org>
Sat, 20 Jul 2019 17:28:37 +0000 (19:28 +0200)
committerSegher Boessenkool <segher@gcc.gnu.org>
Sat, 20 Jul 2019 17:28:37 +0000 (19:28 +0200)
The new predicate accepts both memory_operand and volatile_mem_operand.

* config/rs6000/predicates.md (volatile_mem_operand): Modernize syntax.
(any_memory_operand): New predicate.
(reg_or_mem_operand): Use it.

From-SVN: r273630

gcc/ChangeLog
gcc/config/rs6000/predicates.md

index 535636bb830da74c2cbfb3dea89c9723264d823d..58220e6d264b3162859f942094985c7afa026a62 100644 (file)
@@ -1,3 +1,9 @@
+2019-07-20  Segher Boessenkool  <segher@kernel.crashing.org>
+
+       * config/rs6000/predicates.md (volatile_mem_operand): Modernize syntax.
+       (any_memory_operand): New predicate.
+       (reg_or_mem_operand): Use it.
+
 2019-07-20  Jakub Jelinek  <jakub@redhat.com>
 
        PR target/91204
index 5f687ead16d1777e17b65f91599dc4c1673c0b01..13c7c02f27aab695a04671fcf576a3adbbf8d72e 100644 (file)
 ;; memory references.  So this function allows us to recognize volatile
 ;; references where it's safe.
 (define_predicate "volatile_mem_operand"
-  (and (and (match_code "mem")
-           (match_test "MEM_VOLATILE_P (op)"))
+  (and (match_code "mem")
+       (match_test "MEM_VOLATILE_P (op)")
        (if_then_else (match_test "reload_completed")
         (match_operand 0 "memory_operand")
         (match_test "memory_address_p (mode, XEXP (op, 0))"))))
 
+;; Return 1 if the operand is a volatile or non-volatile memory operand.
+(define_predicate "any_memory_operand"
+  (ior (match_operand 0 "memory_operand")
+       (match_operand 0 "volatile_mem_operand")))
+
 ;; Return 1 if the operand is an offsettable memory operand.
 (define_predicate "offsettable_mem_operand"
   (and (match_operand 0 "memory_operand")
 
 ;; Return 1 if the operand is a general non-special register or memory operand.
 (define_predicate "reg_or_mem_operand"
-  (ior (match_operand 0 "memory_operand")
+  (ior (match_operand 0 "gpc_reg_operand")
+       (match_operand 0 "any_memory_operand")
        (and (match_code "mem")
-           (match_test "macho_lo_sum_memory_operand (op, mode)"))
-       (match_operand 0 "volatile_mem_operand")
-       (match_operand 0 "gpc_reg_operand")))
+           (match_test "macho_lo_sum_memory_operand (op, mode)"))))
 
 ;; Return 1 if the operand is CONST_DOUBLE 0, register or memory operand.
 (define_predicate "zero_reg_mem_operand"
This page took 0.087166 seconds and 5 git commands to generate.