]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
For Greta Yorsh.
authorGreta Yorsh <greta.yorsh@arm.com>
Fri, 2 Mar 2012 12:09:04 +0000 (12:09 +0000)
committerRamana Radhakrishnan <ramana@gcc.gnu.org>
Fri, 2 Mar 2012 12:09:04 +0000 (12:09 +0000)
2012-03-02  Greta Yorsh  <Greta.Yorsh@arm.com>

       * config/arm/arm-ldmstm.ml (write_ldm_commutative_peephole):
Improve conditions for peepholes of loads followed by commutative
operators.
       * config/arm/ldmstm.md: Regenerated.

From-SVN: r184783

gcc/ChangeLog
gcc/config/arm/arm-ldmstm.ml
gcc/config/arm/ldmstm.md

index 8aa15e995ebb066649097c33caf112459054a8ee..49e59dd80dbdce62a77c933d1ea5ddcac8169a99 100644 (file)
@@ -1,3 +1,10 @@
+2012-03-02  Greta Yorsh  <Greta.Yorsh@arm.com>
+
+       * config/arm/arm-ldmstm.ml (write_ldm_commutative_peephole):
+       Improve conditions for peepholes of loads followed by commutative
+       operators.
+       * config/arm/ldmstm.md: Regenerated.
+
 2012-03-02  Richard Guenther  <rguenther@suse.de>
 
        * BASE-VER: Set to 4.8.0.
index 221edd2aa31ac63eebde456772a0082d283b034f..1d98ef038efbb5d51aed5de5615772b6131b0b63 100644 (file)
@@ -216,9 +216,14 @@ let write_ldm_commutative_peephole thumb =
     Printf.printf "%s          (match_operand:SI %d \"s_register_operand\" \"\")]))\n" indent (nregs * 2 + 3);
     Printf.printf "%s   (clobber (reg:CC CC_REGNUM))])]\n" indent
   end;
-  Printf.printf "  \"(((operands[%d] == operands[0] && operands[%d] == operands[1])\n" (nregs * 2 + 2) (nregs * 2 + 3);
-  Printf.printf "     || (operands[%d] == operands[0] && operands[%d] == operands[1]))\n" (nregs * 2 + 3) (nregs * 2 + 2);
-  Printf.printf "    && peep2_reg_dead_p (%d, operands[0]) && peep2_reg_dead_p (%d, operands[1]))\"\n" (nregs + 1) (nregs + 1);
+  Printf.printf "  \"((((REGNO (operands[%d]) == REGNO (operands[0]))\n" (nregs * 2 + 2);
+  Printf.printf "         && (REGNO (operands[%d]) == REGNO (operands[1])))\n"  (nregs * 2 + 3);
+  Printf.printf "      || ((REGNO (operands[%d]) == REGNO (operands[0]))\n" (nregs * 2 + 3);
+  Printf.printf "         && (REGNO (operands[%d]) == REGNO (operands[1]))))\n" (nregs * 2 + 2);
+  Printf.printf "    && (peep2_regno_dead_p (%d, REGNO (operands[0]))\n" (nregs + 1);
+  Printf.printf "      || (REGNO (operands[0]) == REGNO (operands[%d])))\n"  (nregs * 2);
+  Printf.printf "    && (peep2_regno_dead_p (%d, REGNO (operands[1]))\n" (nregs + 1);
+  Printf.printf "      || (REGNO (operands[1]) == REGNO (operands[%d]))))\"\n" (nregs * 2);
   begin
     if thumb then
       Printf.printf "  [(set (match_dup %d) (match_op_dup %d [(match_dup %d) (match_dup %d)]))]\n"
index 5db4a3269968b396e9ae811dc616e7e1adb3291d..0835f1637a88b7db23518a5bd75538e3400fe974 100644 (file)
             [(match_operand:SI 6 "s_register_operand" "")
              (match_operand:SI 7 "s_register_operand" "")]))
       (clobber (reg:CC CC_REGNUM))])]
-  "(((operands[6] == operands[0] && operands[7] == operands[1])
-     || (operands[7] == operands[0] && operands[6] == operands[1]))
-    && peep2_reg_dead_p (3, operands[0]) && peep2_reg_dead_p (3, operands[1]))"
+  "((((REGNO (operands[6]) == REGNO (operands[0]))
+         && (REGNO (operands[7]) == REGNO (operands[1])))
+      || ((REGNO (operands[7]) == REGNO (operands[0]))
+         && (REGNO (operands[6]) == REGNO (operands[1]))))
+    && (peep2_regno_dead_p (3, REGNO (operands[0]))
+      || (REGNO (operands[0]) == REGNO (operands[4])))
+    && (peep2_regno_dead_p (3, REGNO (operands[1]))
+      || (REGNO (operands[1]) == REGNO (operands[4]))))"
   [(parallel
     [(set (match_dup 4) (match_op_dup 5 [(match_dup 6) (match_dup 7)]))
      (clobber (reg:CC CC_REGNUM))])]
         (match_operator:SI 5 "commutative_binary_operator"
          [(match_operand:SI 6 "s_register_operand" "")
           (match_operand:SI 7 "s_register_operand" "")]))]
-  "(((operands[6] == operands[0] && operands[7] == operands[1])
-     || (operands[7] == operands[0] && operands[6] == operands[1]))
-    && peep2_reg_dead_p (3, operands[0]) && peep2_reg_dead_p (3, operands[1]))"
+  "((((REGNO (operands[6]) == REGNO (operands[0]))
+         && (REGNO (operands[7]) == REGNO (operands[1])))
+      || ((REGNO (operands[7]) == REGNO (operands[0]))
+         && (REGNO (operands[6]) == REGNO (operands[1]))))
+    && (peep2_regno_dead_p (3, REGNO (operands[0]))
+      || (REGNO (operands[0]) == REGNO (operands[4])))
+    && (peep2_regno_dead_p (3, REGNO (operands[1]))
+      || (REGNO (operands[1]) == REGNO (operands[4]))))"
   [(set (match_dup 4) (match_op_dup 5 [(match_dup 6) (match_dup 7)]))]
 {
   if (!gen_ldm_seq (operands, 2, true))