This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
minor bug (?) in alpha.c
- To: egcs-bugs at cygnus dot com
- Subject: minor bug (?) in alpha.c
- From: kanazawa at flab dot fujitsu dot co dot jp (Kanazawa Yuzi)
- Date: Thu, 6 Nov 1997 18:04:22 +0900 (JST)
I tried egcs-971031 for alpha-linux. I am happy that code produced
by egcs with haifa scheduler runs 10 - 20% faster than code produced
by gcc-2.7.2.1. Yet I think there is a minor bug in the code added to
use haifa scheduler.
The following is the code in alpha_adjust_cost() which exists after
line 1193 of gcc/config/alpha/alpha.c . I think this code is strange
because it never checks attr_type of `dep_insn', but checks attr_type
of `insn' twice. I guess this is a typo and the argument of switch
statement should be `get_attr_type(dep_insn)'.
----- cut from gcc/config/alpha/alpha.c -----
/* On EV5 it takes longer to get data to the multiplier than to
anywhere else, so increase costs. */
if (recog_memoized (insn) >= 0
&& recog_memoized (dep_insn) >= 0
&& (get_attr_type (insn) == TYPE_IMULL
|| get_attr_type (insn) == TYPE_IMULQ
|| get_attr_type (insn) == TYPE_IMULH)
&& (set = single_set (dep_insn)) != 0
&& GET_CODE (PATTERN (insn)) == SET
&& (set_src = SET_SRC (PATTERN (insn)),
GET_CODE (set_src) == MULT)
&& (set = SET_DEST (set),
rtx_equal_p (set, XEXP (set_src, 0))
|| rtx_equal_p (set, XEXP (set_src, 1))))
{
switch (get_attr_type (insn))
{
case TYPE_LD:
case TYPE_CMOV:
case TYPE_IMULL:
case TYPE_IMULQ:
case TYPE_IMULH:
return cost + 1;
case TYPE_JSR:
case TYPE_IADD:
case TYPE_ILOG:
case TYPE_SHIFT:
case TYPE_ICMP:
return cost + 2;
}
}
--
Kanazawa, Yuzi
kanazawa@flab.fujitsu.co.jp