diff options
author | Greta Yorsh <greta.yorsh@arm.com> | 2012-03-02 12:09:04 +0000 |
---|---|---|
committer | Ramana Radhakrishnan <ramana@gcc.gnu.org> | 2012-03-02 12:09:04 +0000 |
commit | 2d68f67f2f107ec9629a003f6bba4b0878f61c36 (patch) | |
tree | 69b90070e353abc45cd2c8d08168172fb39949c8 /gcc | |
parent | 7167a5015e9cdbb3e24dea6c345f5482296bfdce (diff) | |
download | gcc-2d68f67f2f107ec9629a003f6bba4b0878f61c36.zip gcc-2d68f67f2f107ec9629a003f6bba4b0878f61c36.tar.gz gcc-2d68f67f2f107ec9629a003f6bba4b0878f61c36.tar.bz2 |
For Greta Yorsh.
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
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 7 | ||||
-rw-r--r-- | gcc/config/arm/arm-ldmstm.ml | 11 | ||||
-rw-r--r-- | gcc/config/arm/ldmstm.md | 22 |
3 files changed, 31 insertions, 9 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 8aa15e9..49e59dd 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -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. diff --git a/gcc/config/arm/arm-ldmstm.ml b/gcc/config/arm/arm-ldmstm.ml index 221edd2..1d98ef0 100644 --- a/gcc/config/arm/arm-ldmstm.ml +++ b/gcc/config/arm/arm-ldmstm.ml @@ -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" diff --git a/gcc/config/arm/ldmstm.md b/gcc/config/arm/ldmstm.md index 5db4a32..0835f16 100644 --- a/gcc/config/arm/ldmstm.md +++ b/gcc/config/arm/ldmstm.md @@ -1160,9 +1160,14 @@ [(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))])] @@ -1180,9 +1185,14 @@ (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)) |