public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH, alpha]: Remove some_operand and some_ni_operand
@ 2015-05-13 18:11 Uros Bizjak
  2015-05-13 20:02 ` Richard Henderson
  0 siblings, 1 reply; 6+ messages in thread
From: Uros Bizjak @ 2015-05-13 18:11 UTC (permalink / raw)
  To: gcc-patches; +Cc: Richard Henderson

[-- Attachment #1: Type: text/plain, Size: 631 bytes --]

We can use general_operand instead of some_operand.

2015-05-13  Uros Bizjak  <ubizjak@gmail.com>

    * config/alpha/alpha.md (extendqidi2): Use general_operand
    instead of some_operand for operand[1] predicate.
    (extendhidi2): Ditto.
    (cbranchdi4): Use general_operand instead of some_operand
    for operand[1] and operands[2] predicates.
    (cstoredi4): Ditto.
    * config/alpha/predicates.md (some_operand): Remove unused predicate.
    (some_ni_operand): Ditto.

Tested on alpha-linux-gnu.

Richard, does this look OK to you, or is there any other reason that
general_operand predicates were not used here?

Uros.

[-- Attachment #2: a.diff.txt --]
[-- Type: text/plain, Size: 2484 bytes --]

Index: config/alpha/alpha.md
===================================================================
--- config/alpha/alpha.md	(revision 223097)
+++ config/alpha/alpha.md	(working copy)
@@ -1235,7 +1235,7 @@
 
 (define_expand "extendqidi2"
   [(set (match_operand:DI 0 "register_operand")
-	(sign_extend:DI (match_operand:QI 1 "some_operand")))]
+	(sign_extend:DI (match_operand:QI 1 "general_operand")))]
   ""
 {
   if (TARGET_BWX)
@@ -1280,7 +1280,7 @@
 
 (define_expand "extendhidi2"
   [(set (match_operand:DI 0 "register_operand")
-	(sign_extend:DI (match_operand:HI 1 "some_operand")))]
+	(sign_extend:DI (match_operand:HI 1 "general_operand")))]
   ""
 {
   if (TARGET_BWX)
@@ -2902,8 +2902,8 @@
 
 (define_expand "cbranchdi4"
   [(use (match_operator 0 "alpha_cbranch_operator"
-         [(match_operand:DI 1 "some_operand")
-          (match_operand:DI 2 "some_operand")]))
+         [(match_operand:DI 1 "general_operand")
+          (match_operand:DI 2 "general_operand")]))
    (use (match_operand 3))]
   ""
   "alpha_emit_conditional_branch (operands, DImode); DONE;")
@@ -2936,8 +2936,8 @@
 
 (define_expand "cstoredi4"
   [(use (match_operator:DI 1 "alpha_cbranch_operator"
-         [(match_operand:DI 2 "some_operand")
-          (match_operand:DI 3 "some_operand")]))
+         [(match_operand:DI 2 "general_operand")
+          (match_operand:DI 3 "general_operand")]))
    (clobber (match_operand:DI 0 "register_operand"))]
   ""
 {
Index: config/alpha/predicates.md
===================================================================
--- config/alpha/predicates.md	(revision 223097)
+++ config/alpha/predicates.md	(working copy)
@@ -148,20 +148,6 @@
   return REGNO_REG_CLASS (REGNO (op)) == GENERAL_REGS;
 })
 
-;; Return 1 if OP is something that can be reloaded into a register;
-;; if it is a MEM, it need not be valid.
-(define_predicate "some_operand"
-  (ior (match_code "reg,mem,const_int,const_wide_int,const_double,const_vector,
-		    label_ref,symbol_ref,const,high")
-       (and (match_code "subreg")
-	    (match_test "some_operand (SUBREG_REG (op), VOIDmode)"))))
-
-;; Likewise, but don't accept constants.
-(define_predicate "some_ni_operand"
-  (ior (match_code "reg,mem")
-       (and (match_code "subreg")
-	    (match_test "some_ni_operand (SUBREG_REG (op), VOIDmode)"))))
-
 ;; Return 1 if OP is a valid operand for the source of a move insn.
 (define_predicate "input_operand"
   (match_code "label_ref,symbol_ref,const,high,reg,subreg,mem,

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2015-05-14 18:06 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-05-13 18:11 [PATCH, alpha]: Remove some_operand and some_ni_operand Uros Bizjak
2015-05-13 20:02 ` Richard Henderson
2015-05-14  9:05   ` Uros Bizjak
2015-05-14 11:36   ` Uros Bizjak
2015-05-14 11:42     ` Uros Bizjak
2015-05-14 18:29       ` Richard Henderson

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).