public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH, i386]: Consolidate and remove unused register_and_not_{,any_}fp_reg_operand predicates
@ 2016-05-06 14:37 Uros Bizjak
  0 siblings, 0 replies; only message in thread
From: Uros Bizjak @ 2016-05-06 14:37 UTC (permalink / raw)
  To: gcc-patches

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

Hello!

2016-05-06  Uros Bizjak  <ubizjak@gmail.com>

    * config/i386/i386.md (int cmove peephole2s): Use general_reg_operand
    instead of register_and_not_any_fp_reg_operand as operand 0 predicate.
    * config/i386/predicates.md (register_and_not_any_fp_reg_operand):
    Remove unused predicate.
    (register_and_not_fp_reg_operand): Ditto.

Patch was bootstrapped and regression tested on x86_64-linux-gnu {,-m32}.

Committed to mainline SVN.

Uros.

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

Index: i386.md
===================================================================
--- i386.md	(revision 235936)
+++ i386.md	(working copy)
@@ -17211,7 +17211,7 @@
    (set_attr "mode" "DF,DF,DI,DI,DI,DI")])
 
 (define_split
-  [(set (match_operand:DF 0 "register_and_not_any_fp_reg_operand")
+  [(set (match_operand:DF 0 "general_reg_operand")
 	(if_then_else:DF (match_operator 1 "fcmov_comparison_operator"
 				[(reg FLAGS_REG) (const_int 0)])
 		      (match_operand:DF 2 "nonimmediate_operand")
@@ -17267,7 +17267,7 @@
 ;; Don't do conditional moves with memory inputs
 (define_peephole2
   [(match_scratch:MODEF 4 "r")
-   (set (match_operand:MODEF 0 "register_and_not_any_fp_reg_operand")
+   (set (match_operand:MODEF 0 "general_reg_operand")
 	(if_then_else:MODEF (match_operator 1 "fcmov_comparison_operator"
 			      [(reg FLAGS_REG) (const_int 0)])
 	  (match_operand:MODEF 2 "nonimmediate_operand")
Index: predicates.md
===================================================================
--- predicates.md	(revision 235932)
+++ predicates.md	(working copy)
@@ -27,11 +27,6 @@
   (and (match_code "reg")
        (match_test "STACK_REGNO_P (REGNO (op))")))
 
-;; Return true if OP is a non-fp register_operand.
-(define_predicate "register_and_not_any_fp_reg_operand"
-  (and (match_code "reg")
-       (not (match_test "ANY_FP_REGNO_P (REGNO (op))"))))
-
 ;; True if the operand is a GENERAL class register.
 (define_predicate "general_reg_operand"
   (and (match_code "reg")
@@ -43,11 +38,6 @@
     (match_test "GENERAL_REGNO_P (REGNO (op))")
     (match_operand 0 "nonimmediate_operand")))
 
-;; Return true if OP is a register operand other than an i387 fp register.
-(define_predicate "register_and_not_fp_reg_operand"
-  (and (match_code "reg")
-       (not (match_test "STACK_REGNO_P (REGNO (op))"))))
-
 ;; True if the operand is an MMX register.
 (define_predicate "mmx_reg_operand"
   (and (match_code "reg")

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2016-05-06 14:37 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-05-06 14:37 [PATCH, i386]: Consolidate and remove unused register_and_not_{,any_}fp_reg_operand predicates Uros Bizjak

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