make_extraction fix
Jan Hubicka
jh@suse.cz
Sat Aug 26 07:11:00 GMT 2000
Hi
This is simple fix to combine to prefer ZERO_EXTENSION over SIGN_EXTENSION as
comment says (currently it does the oposite). The bug was introduced by me
some time ago by not very curefull copying it from the other place.
Bootstraped on i386 with few code size improvements.
Honza
Sat Aug 26 14:38:22 CEST 2000 Jan Hubicka <jh@suse.cz>
* combine.c (make_extraction): Fix rtx_cost comparison to
match the comment.
*** combine.c.orig Sat Aug 26 11:41:35 2000
--- combine.c Sat Aug 26 14:36:38 2000
*************** make_extraction (mode, inner, pos, pos_r
*** 6000,6008 ****
rtx temp = gen_rtx_ZERO_EXTEND (mode, new);
rtx temp1 = gen_rtx_SIGN_EXTEND (mode, new);
! /* Prefer ZERO_EXTENSION, since it gives more information to
backends. */
! if (rtx_cost (temp, SET) < rtx_cost (temp1, SET))
return temp;
return temp1;
}
--- 6000,6008 ----
rtx temp = gen_rtx_ZERO_EXTEND (mode, new);
rtx temp1 = gen_rtx_SIGN_EXTEND (mode, new);
! /* Preffer ZERO_EXTENSION, since it gives more information to
backends. */
! if (rtx_cost (temp, SET) <= rtx_cost (temp1, SET))
return temp;
return temp1;
}
More information about the Gcc-patches
mailing list