arm.md (addsi3_cbranch): If destination is a high register...
authorBernd Schmidt <bernd.schmidt@codesourcery.com>
Fri, 16 Apr 2010 09:47:17 +0000 (09:47 +0000)
committerBernd Schmidt <bernds@gcc.gnu.org>
Fri, 16 Apr 2010 09:47:17 +0000 (09:47 +0000)
* 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

gcc/ChangeLog
gcc/config/arm/arm.md

index 0e384b5..a3bb0b0 100644 (file)
        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,
index 1a07f36..4604e13 100644 (file)
        (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
    {
      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];
 
      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)