* pa.md (movsicc): New expander.
authorJeff Law <law@gcc.gnu.org>
Mon, 6 Mar 1995 07:29:33 +0000 (00:29 -0700)
committerJeff Law <law@gcc.gnu.org>
Mon, 6 Mar 1995 07:29:33 +0000 (00:29 -0700)
From-SVN: r9124

gcc/config/pa/pa.md

index b7ae3ad40f1b7fb28e923164021f2433e1c8e08c..b01a504e3c64c2cbf247892f2f1f46f706b132c9 100644 (file)
  (set_attr "length" "8,8")])
 ;;; Experimental conditional move patterns
 
+(define_expand "movsicc"
+  [(set (match_operand:SI 0 "register_operand" "")
+       (if_then_else:SI
+        (match_operator 1 "comparison_operator"
+           [(match_operand:SI 4 "register_operand" "")
+            (match_operand:SI 5 "arith11_operand" "")])
+        (match_operand:SI 2 "reg_or_cint_move_operand" "")
+        (match_operand:SI 3 "reg_or_cint_move_operand" "")))]
+  ""
+  "
+{
+  enum rtx_code code = GET_CODE (operands[1]);
+
+  if (hppa_branch_type != CMP_SI)
+    FAIL;
+
+  /* operands[1] is currently the result of compare_from_rtx.  We want to
+     emit a compare of the original operands.  */
+  operands[1] = gen_rtx (code, SImode, hppa_compare_op0, hppa_compare_op1);
+  operands[4] = hppa_compare_op0;
+  operands[5] = hppa_compare_op1;
+}")
+
 ; We need the first constraint alternative in order to avoid
 ; earlyclobbers on all other alternatives.
 (define_insn ""