Fix problem with my latest patch to expand_mult_highpart
Richard Kenner
kenner@vlsi1.ultra.nyu.edu
Wed Apr 21 17:05:00 GMT 2004
It looks like I forgot to switch to using the narrower version of OP1
in two places. This fixes that. One of those was causing an ICE compiling
the C++ library on PPC. I hope (and assume) it was also causing the
related errors elsewhere (e.g., HPUX).
Tested on i36_64-linux.
2004-04-21 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
* expmed.c (expand_mult_highpart_optab): Use narrower version of OP1
in two more places; remove unneeded force_reg
*** expmed.c 19 Apr 2004 12:02:02 -0000 1.156
--- expmed.c 21 Apr 2004 12:28:17 -0000
*************** expand_mult_highpart_optab (enum machine
*** 2884,2887 ****
--- 2884,2888 ----
rtx target, int unsignedp, int max_cost)
{
+ rtx narrow_op1 = gen_int_mode (INTVAL (op1), mode);
enum machine_mode wider_mode;
optab moptab;
*************** expand_mult_highpart_optab (enum machine
*** 2897,2902 ****
{
moptab = unsignedp ? umul_highpart_optab : smul_highpart_optab;
! tem = expand_binop (mode, moptab, op0,
! gen_int_mode (INTVAL (op1), mode), target,
unsignedp, OPTAB_DIRECT);
if (tem)
--- 2898,2902 ----
{
moptab = unsignedp ? umul_highpart_optab : smul_highpart_optab;
! tem = expand_binop (mode, moptab, op0, narrow_op1, target,
unsignedp, OPTAB_DIRECT);
if (tem)
*************** expand_mult_highpart_optab (enum machine
*** 2911,2916 ****
{
moptab = unsignedp ? smul_highpart_optab : umul_highpart_optab;
! tem = expand_binop (mode, moptab, op0,
! gen_int_mode (INTVAL (op1), mode), target,
unsignedp, OPTAB_DIRECT);
if (tem)
--- 2911,2915 ----
{
moptab = unsignedp ? smul_highpart_optab : umul_highpart_optab;
! tem = expand_binop (mode, moptab, op0, narrow_op1, target,
unsignedp, OPTAB_DIRECT);
if (tem)
*************** expand_mult_highpart_optab (enum machine
*** 2925,2929 ****
&& mul_widen_cost[(int) wider_mode] < max_cost)
{
! tem = expand_binop (wider_mode, moptab, op0, op1, 0,
unsignedp, OPTAB_WIDEN);
if (tem)
--- 2924,2928 ----
&& mul_widen_cost[(int) wider_mode] < max_cost)
{
! tem = expand_binop (wider_mode, moptab, op0, narrow_op1, 0,
unsignedp, OPTAB_WIDEN);
if (tem)
*************** expand_mult_highpart_optab (enum machine
*** 2950,2955 ****
+ 2 * shift_cost[size-1] + 4 * add_cost < max_cost))
{
! rtx regop1 = force_reg (mode, op1);
! tem = expand_binop (wider_mode, moptab, op0, regop1,
NULL_RTX, ! unsignedp, OPTAB_WIDEN);
if (tem != 0)
--- 2949,2953 ----
+ 2 * shift_cost[size-1] + 4 * add_cost < max_cost))
{
! tem = expand_binop (wider_mode, moptab, op0, narrow_op1,
NULL_RTX, ! unsignedp, OPTAB_WIDEN);
if (tem != 0)
More information about the Gcc-patches
mailing list