This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[patch] h8300.md: Remove one alternative from addsi_h8300.
- From: Kazu Hirata <kazu at cs dot umass dot edu>
- To: gcc-patches at gcc dot gnu dot org
- Date: Mon, 20 Jan 2003 23:02:20 -0500 (EST)
- Subject: [patch] h8300.md: Remove one alternative from addsi_h8300.
Hi,
Attached is a patch to remove one alternative from addsi_h8300.
The last alternative of addsi_h8300 tends to generate worse code in
most cases when I compared the result of newlib compilation with and
without the alternative. The patch removes that.
Tested on h8300 port. Committed.
Kazu Hirata
2003-01-20 Kazu Hirata <kazu@cs.umass.edu>
* config/h8300/h8300.md (addsi_h8300): Remove the last
alternative.
Index: h8300.md
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/h8300/h8300.md,v
retrieving revision 1.151
diff -c -r1.151 h8300.md
*** h8300.md 14 Jan 2003 13:11:24 -0000 1.151
--- h8300.md 21 Jan 2003 03:55:51 -0000
***************
*** 855,870 ****
"")
(define_insn "addsi_h8300"
! [(set (match_operand:SI 0 "register_operand" "=r,r,&r")
! (plus:SI (match_operand:SI 1 "register_operand" "%0,0,r")
! (match_operand:SI 2 "nonmemory_operand" "n,r,r")))]
"TARGET_H8300"
"@
add %w2,%w0\;addx %x2,%x0\;addx %y2,%y0\;addx %z2,%z0
! add.w %f2,%f0\;addx %y2,%y0\;addx %z2,%z0
! mov.w %f1,%f0\;mov.w %e1,%e0\;add.w %f2,%f0\;addx %y2,%y0\;addx %z2,%z0"
! [(set_attr "length" "8,6,10")
! (set_attr "cc" "clobber")])
(define_insn "addsi_h8300h"
[(set (match_operand:SI 0 "register_operand" "=r,r")
--- 855,869 ----
"")
(define_insn "addsi_h8300"
! [(set (match_operand:SI 0 "register_operand" "=r,r")
! (plus:SI (match_operand:SI 1 "register_operand" "%0,0")
! (match_operand:SI 2 "nonmemory_operand" "n,r")))]
"TARGET_H8300"
"@
add %w2,%w0\;addx %x2,%x0\;addx %y2,%y0\;addx %z2,%z0
! add.w %f2,%f0\;addx %y2,%y0\;addx %z2,%z0"
! [(set_attr "length" "8,6")
! (set_attr "cc" "clobber,clobber")])
(define_insn "addsi_h8300h"
[(set (match_operand:SI 0 "register_operand" "=r,r")