Commit 3302cfa1 by Bernd Schmidt Committed by Bernd Schmidt

arm.md (addsi3_cbranch): If destination is a high register...

	* config/arm/arm.md (addsi3_cbranch): If destination is a high
	register, inputs must be low registers and we need a low register
	scratch.  Handle alternative 2 like alternative 3.

From-SVN: r158405
parent 6ea007e4
......@@ -13,6 +13,10 @@
If the previous insn is a cbranchsi4_insn with the same arguments,
omit the compare instruction.
* config/arm/arm.md (addsi3_cbranch): If destination is a high
register, inputs must be low registers and we need a low register
scratch. Handle alternative 2 like alternative 3.
2010-04-16 Jakub Jelinek <jakub@redhat.com>
* alias.c (memrefs_conflict_p): If x and y are the same VALUE,
......
......@@ -7543,15 +7543,15 @@
(if_then_else
(match_operator 4 "arm_comparison_operator"
[(plus:SI
(match_operand:SI 2 "s_register_operand" "%l,0,*0,1,1,1")
(match_operand:SI 3 "reg_or_int_operand" "lL,IJ,*r,lIJ,lIJ,lIJ"))
(match_operand:SI 2 "s_register_operand" "%l,0,*l,1,1,1")
(match_operand:SI 3 "reg_or_int_operand" "lL,IJ,*l,lIJ,lIJ,lIJ"))
(const_int 0)])
(label_ref (match_operand 5 "" ""))
(pc)))
(set
(match_operand:SI 0 "thumb_cbrch_target_operand" "=l,l,*!h,*?h,*?m,*?m")
(plus:SI (match_dup 2) (match_dup 3)))
(clobber (match_scratch:SI 1 "=X,X,X,l,&l,&l"))]
(clobber (match_scratch:SI 1 "=X,X,l,l,&l,&l"))]
"TARGET_THUMB1
&& (GET_CODE (operands[4]) == EQ
|| GET_CODE (operands[4]) == NE
......@@ -7561,8 +7561,7 @@
{
rtx cond[3];
cond[0] = (which_alternative < 3) ? operands[0] : operands[1];
cond[0] = (which_alternative < 2) ? operands[0] : operands[1];
cond[1] = operands[2];
cond[2] = operands[3];
......@@ -7571,7 +7570,7 @@
else
output_asm_insn (\"add\\t%0, %1, %2\", cond);
if (which_alternative >= 3
if (which_alternative >= 2
&& which_alternative < 4)
output_asm_insn (\"mov\\t%0, %1\", operands);
else if (which_alternative >= 4)
......
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