OSDN Git Service

2009-09-29 Steve Ellcey <sje@cup.hp.com>
authorsje <sje@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 29 Sep 2009 22:21:27 +0000 (22:21 +0000)
committersje <sje@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 29 Sep 2009 22:21:27 +0000 (22:21 +0000)
    Alexander Monakov  <amonakov@ispras.ru>

PR target/41365
* config/ia64/predicates.md (not_postinc_destination_operand): New.
(not_postinc_memory_operand): New.
(not_postinc_move_operand): New.
* config/ia64/ia64.md (*cmovdi_internal): Disallow autoincrement.
(*cmovsi_internal): Ditto.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@152306 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/config/ia64/ia64.md
gcc/config/ia64/predicates.md

index 197cec1..7439cef 100644 (file)
@@ -1,3 +1,13 @@
+2009-09-29  Steve Ellcey  <sje@cup.hp.com>
+           Alexander Monakov  <amonakov@ispras.ru>
+
+       PR target/41365 
+       * config/ia64/predicates.md (not_postinc_destination_operand): New.
+       (not_postinc_memory_operand): New.
+       (not_postinc_move_operand): New.
+       * config/ia64/ia64.md (*cmovdi_internal): Disallow autoincrement.
+       (*cmovsi_internal): Ditto.
+
 2009-09-29  Pat Haugen  <pthaugen@us.ibm.com>
 
        * config/rs6000/rs6000.c (rs6000_issue_rate): Don't artificially
index f9c6de2..4ed427f 100644 (file)
 ;;
 
 (define_insn "*cmovdi_internal"
-  [(set (match_operand:DI 0 "destination_operand"
+  [(set (match_operand:DI 0 "not_postinc_destination_operand"
           "= r,  r,  r,   r,  r,  r,   r, r, r,   r, m, Q, *f,*b,*d*e")
        (if_then_else:DI
          (match_operator 4 "predicate_operator"
            [(match_operand:BI 1 "register_operand"
                "c,c,c,c,c,c,c,c,c,c,c,c,c,c,c")
             (const_int 0)])
-         (match_operand:DI 2 "move_operand"
+         (match_operand:DI 2 "not_postinc_move_operand"
           "rim, *f, *b,*d*e,rim,rim, rim,*f,*b,*d*e,rO,*f,rOQ,rO,  rK")
-         (match_operand:DI 3 "move_operand"
+         (match_operand:DI 3 "not_postinc_move_operand"
           "rim,rim,rim, rim, *f, *b,*d*e,*f,*b,*d*e,rO,*f,rOQ,rO,  rK")))]
   "ia64_move_ok (operands[0], operands[2])
    && ia64_move_ok (operands[0], operands[3])"
   [(set_attr "predicable" "no")])
 
 (define_split
-  [(set (match_operand 0 "destination_operand" "")
+  [(set (match_operand 0 "not_postinc_destination_operand" "")
        (if_then_else
          (match_operator 4 "predicate_operator"
            [(match_operand:BI 1 "register_operand" "")
             (const_int 0)])
-         (match_operand 2 "move_operand" "")
-         (match_operand 3 "move_operand" "")))]
+         (match_operand 2 "not_postinc_move_operand" "")
+         (match_operand 3 "not_postinc_move_operand" "")))]
   "reload_completed"
   [(const_int 0)]
 {
 ;;
 
 (define_insn "*cmovsi_internal"
-  [(set (match_operand:SI 0 "destination_operand" "=r,m,*f,r,m,*f,r,m,*f")
+  [(set (match_operand:SI 0 "not_postinc_destination_operand"
+               "=r,m,*f,r,m,*f,r,m,*f")
        (if_then_else:SI
          (match_operator 4 "predicate_operator"
            [(match_operand:BI 1 "register_operand" "c,c,c,c,c,c,c,c,c")
             (const_int 0)])
-         (match_operand:SI 2 "move_operand"
+         (match_operand:SI 2 "not_postinc_move_operand"
                    "0,0,0,rim*f,rO,rO,rim*f,rO,rO")
-         (match_operand:SI 3 "move_operand"
+         (match_operand:SI 3 "not_postinc_move_operand"
                    "rim*f,rO,rO,0,0,0,rim*f,rO,rO")))]
   "ia64_move_ok (operands[0], operands[2])
    && ia64_move_ok (operands[0], operands[3])"
index 1503a05..2d0af6f 100644 (file)
                    || GET_CODE (XEXP (op, 0)) != POST_MODIFY
                    || GET_CODE (XEXP (XEXP (XEXP (op, 0), 1), 1)) != REG")))
 
+;; Like destination_operand, but don't allow any post-increments.
+(define_predicate "not_postinc_destination_operand"
+  (and (match_operand 0 "nonimmediate_operand")
+       (match_test "GET_CODE (op) != MEM
+        || GET_RTX_CLASS (GET_CODE (XEXP (op, 0))) != RTX_AUTOINC")))
+
 ;; Like memory_operand, but don't allow post-increments.
 (define_predicate "not_postinc_memory_operand"
   (and (match_operand 0 "memory_operand")
     }
 })
 
+;; Like move_operand but don't allow post-increments.
+(define_predicate "not_postinc_move_operand"
+  (and (match_operand 0 "move_operand")
+       (match_test "GET_CODE (op) != MEM
+        || GET_RTX_CLASS (GET_CODE (XEXP (op, 0))) != RTX_AUTOINC")))
+
 ;; True if OP is a register operand that is (or could be) a GR reg.
 (define_predicate "gr_register_operand"
   (match_operand 0 "register_operand")