diff options
author | Michael Hayes <m.hayes@gcc.gnu.org> | 1999-04-20 23:18:44 +0000 |
---|---|---|
committer | Michael Hayes <m.hayes@gcc.gnu.org> | 1999-04-20 23:18:44 +0000 |
commit | 82bfb8e38fb51eb26a6b631569676961951d9986 (patch) | |
tree | 192ff04b90e438ebd750db43b8f416a6b9b064fa /gcc | |
parent | 65c78c7d76df9e949d577992e1725a702e3d4510 (diff) | |
download | gcc-82bfb8e38fb51eb26a6b631569676961951d9986.zip gcc-82bfb8e38fb51eb26a6b631569676961951d9986.tar.gz gcc-82bfb8e38fb51eb26a6b631569676961951d9986.tar.bz2 |
* config/c4x/c4x.md: Add new peepholes to remove redundant loads.
From-SVN: r26571
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 8 | ||||
-rw-r--r-- | gcc/config/c4x/c4x.md | 23 |
2 files changed, 30 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 353beff..416fce9 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,8 +1,14 @@ +Wed Apr 21 18:15:55 1999 Michael Hayes <m.hayes@elec.canterbury.ac.nz> + + * config/c4x/c4x.md: Add new peepholes to remove redundant loads. + Wed Apr 21 17:41:29 1999 Michael Hayes <m.hayes@elec.canterbury.ac.nz> * config/c4x/c4x.md (binary patterns): Reorder alternatives so that two operand instructions are chosen before three operand - instructions.Tue Apr 20 23:38:58 1999 Nathan Sidwell <nathan@acm.org> + instructions. + +Tue Apr 20 23:38:58 1999 Nathan Sidwell <nathan@acm.org> * objc/Make-lang.in (objc-parse.c): Put BISON parameters in correct order. diff --git a/gcc/config/c4x/c4x.md b/gcc/config/c4x/c4x.md index fc567f2..0769556 100644 --- a/gcc/config/c4x/c4x.md +++ b/gcc/config/c4x/c4x.md @@ -7101,3 +7101,26 @@ "(REGNO (operands[0]) != REGNO (operands[4]))" "xor3\\t%2,%1,%0\\n||\\tsti\\t%4,%3") +; The following two peepholes remove an unecessary load +; often found at the end of a function. These peepholes +; could be generalised to other binary operators. They shouldn't +; be required if we run a post reload mop-up pass. +(define_peephole + [(parallel [(set (match_operand:QF 0 "ext_reg_operand" "") + (plus:QF (match_operand:QF 1 "ext_reg_operand" "") + (match_operand:QF 2 "ext_reg_operand" ""))) + (clobber (reg:CC_NOOV 21))]) + (set (match_operand:QF 3 "ext_reg_operand" "") + (match_dup 0))] + "dead_or_set_p (insn, operands[0])" + "addf3\\t%2,%1,%3") + +(define_peephole + [(parallel [(set (match_operand:QI 0 "reg_operand" "") + (plus:QI (match_operand:QI 1 "reg_operand" "") + (match_operand:QI 2 "reg_operand" ""))) + (clobber (reg:CC_NOOV 21))]) + (set (match_operand:QI 3 "reg_operand" "") + (match_dup 0))] + "dead_or_set_p (insn, operands[0])" + "addi3\\t%2,%1,%3") |