Commit 4d4f9f19 by Ian Lance Taylor Committed by Ian Lance Taylor

iwmmxt.md (cond_iwmmxt_movsi_insn): New pattern.

	* config/arm/iwmmxt.md (cond_iwmmxt_movsi_insn): New pattern.
	* config/arm/arm.md: For splits which rely on conditional moves,
	remove ! TARGET_IWMMXT condition.

From-SVN: r72456
parent c92c2a28
2003-10-13 Ian Lance Taylor <ian@wasabisystems.com>
* config/arm/iwmmxt.md (cond_iwmmxt_movsi_insn): New pattern.
* config/arm/arm.md: For splits which rely on conditional moves,
remove ! TARGET_IWMMXT condition.
2003-10-13 David S. Miller <davem@redhat.com> 2003-10-13 David S. Miller <davem@redhat.com>
* ifcvt.c (num_removed_blocks): Rename to num_true_changes. * ifcvt.c (num_removed_blocks): Rename to num_true_changes.
......
...@@ -8522,10 +8522,7 @@ ...@@ -8522,10 +8522,7 @@
(match_dup 0) (match_dup 0)
(match_operand 4 "" ""))) (match_operand 4 "" "")))
(clobber (reg:CC CC_REGNUM))] (clobber (reg:CC CC_REGNUM))]
;; Note we have to suppress this split for the iwmmxt because it "TARGET_ARM && reload_completed"
;; creates a conditional movsi and the iwmmxt_movsi_insn pattern
;; is not predicable. This sucks.
"TARGET_ARM && reload_completed && ! TARGET_IWMMXT"
[(set (match_dup 5) (match_dup 6)) [(set (match_dup 5) (match_dup 6))
(cond_exec (match_dup 7) (cond_exec (match_dup 7)
(set (match_dup 0) (match_dup 4)))] (set (match_dup 0) (match_dup 4)))]
...@@ -8553,10 +8550,7 @@ ...@@ -8553,10 +8550,7 @@
(match_operand 4 "" "") (match_operand 4 "" "")
(match_dup 0))) (match_dup 0)))
(clobber (reg:CC CC_REGNUM))] (clobber (reg:CC CC_REGNUM))]
;; Note we have to suppress this split for the iwmmxt because it "TARGET_ARM && reload_completed"
;; creates a conditional movsi and the iwmmxt_movsi_insn pattern
;; is not predicable. This sucks.
"TARGET_ARM && reload_completed && ! TARGET_IWMMXT"
[(set (match_dup 5) (match_dup 6)) [(set (match_dup 5) (match_dup 6))
(cond_exec (match_op_dup 1 [(match_dup 5) (const_int 0)]) (cond_exec (match_op_dup 1 [(match_dup 5) (const_int 0)])
(set (match_dup 0) (match_dup 4)))] (set (match_dup 0) (match_dup 4)))]
...@@ -8577,10 +8571,7 @@ ...@@ -8577,10 +8571,7 @@
(match_operand 4 "" "") (match_operand 4 "" "")
(match_operand 5 "" ""))) (match_operand 5 "" "")))
(clobber (reg:CC CC_REGNUM))] (clobber (reg:CC CC_REGNUM))]
;; Note we have to suppress this split for the iwmmxt because it "TARGET_ARM && reload_completed"
;; creates a conditional movsi and the iwmmxt_movsi_insn pattern
;; is not predicable. This sucks.
"TARGET_ARM && reload_completed && ! TARGET_IWMMXT"
[(set (match_dup 6) (match_dup 7)) [(set (match_dup 6) (match_dup 7))
(cond_exec (match_op_dup 1 [(match_dup 6) (const_int 0)]) (cond_exec (match_op_dup 1 [(match_dup 6) (const_int 0)])
(set (match_dup 0) (match_dup 4))) (set (match_dup 0) (match_dup 4)))
...@@ -8612,10 +8603,7 @@ ...@@ -8612,10 +8603,7 @@
(not:SI (not:SI
(match_operand:SI 5 "s_register_operand" "")))) (match_operand:SI 5 "s_register_operand" ""))))
(clobber (reg:CC CC_REGNUM))] (clobber (reg:CC CC_REGNUM))]
;; Note we have to suppress this split for the iwmmxt because it "TARGET_ARM && reload_completed"
;; creates a conditional movsi and the iwmmxt_movsi_insn pattern
;; is not predicable. This sucks.
"TARGET_ARM && reload_completed && ! TARGET_IWMMXT"
[(set (match_dup 6) (match_dup 7)) [(set (match_dup 6) (match_dup 7))
(cond_exec (match_op_dup 1 [(match_dup 6) (const_int 0)]) (cond_exec (match_op_dup 1 [(match_dup 6) (const_int 0)])
(set (match_dup 0) (match_dup 4))) (set (match_dup 0) (match_dup 4)))
......
...@@ -116,7 +116,8 @@ ...@@ -116,7 +116,8 @@
(set_attr "neg_pool_range" "*,*,4084, *,*,*, *, 1012,*") (set_attr "neg_pool_range" "*,*,4084, *,*,*, *, 1012,*")
;; Note - the "predicable" attribute is not allowed to have alternatives. ;; Note - the "predicable" attribute is not allowed to have alternatives.
;; Since the wSTRw wCx instruction is not predicable, we cannot support ;; Since the wSTRw wCx instruction is not predicable, we cannot support
;; predicating any of the alternatives in this template. This sucks. ;; predicating any of the alternatives in this template. Instead,
;; we do the predication ourselves, in cond_iwmmxt_movsi_insn.
(set_attr "predicable" "no") (set_attr "predicable" "no")
;; Also - we have to pretend that these insns clobber the condition code ;; Also - we have to pretend that these insns clobber the condition code
;; bits as otherwise arm_final_prescan_insn() will try to conditionalize ;; bits as otherwise arm_final_prescan_insn() will try to conditionalize
...@@ -124,6 +125,34 @@ ...@@ -124,6 +125,34 @@
(set_attr "conds" "clob")] (set_attr "conds" "clob")]
) )
;; Because iwmmxt_movsi_insn is not predicable, we provide the
;; cond_exec version explicitly, with appropriate constraints.
(define_insn "*cond_iwmmxt_movsi_insn"
[(cond_exec
(match_operator 2 "arm_comparison_operator"
[(match_operand 3 "cc_register" "")
(const_int 0)])
(set (match_operand:SI 0 "nonimmediate_operand" "=r,r,r, m,z,r")
(match_operand:SI 1 "general_operand" "rI,K,mi,r,r,z")))]
"TARGET_REALLY_IWMMXT
&& ( register_operand (operands[0], SImode)
|| register_operand (operands[1], SImode))"
"*
switch (which_alternative)
{
case 0: return \"mov%?\\t%0, %1\";
case 1: return \"mvn%?\\t%0, #%B1\";
case 2: return \"ldr%?\\t%0, %1\";
case 3: return \"str%?\\t%1, %0\";
case 4: return \"tmcr%?\\t%0, %1\";
default: return \"tmrc%?\\t%0, %1\";
}"
[(set_attr "type" "*,*,load,store1,*,*")
(set_attr "pool_range" "*,*,4096, *,*,*")
(set_attr "neg_pool_range" "*,*,4084, *,*,*")]
)
(define_insn "movv8qi_internal" (define_insn "movv8qi_internal"
[(set (match_operand:V8QI 0 "nonimmediate_operand" "=y,m,y,?r,?y,?r") [(set (match_operand:V8QI 0 "nonimmediate_operand" "=y,m,y,?r,?y,?r")
(match_operand:V8QI 1 "general_operand" "y,y,m,y,r,i"))] (match_operand:V8QI 1 "general_operand" "y,y,m,y,r,i"))]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment