This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [cond-optab] svn branch created, looking for reviews for the "cleanup" parts


Hi,

On Thu, 9 Apr 2009, Paolo Bonzini wrote:

> Fixed like this:
> 
> Index: gcc/optabs.c
> ===================================================================
> --- gcc/optabs.c        (branch cond-optab)
> +++ gcc/optabs.c        (working copy)
> @@ -4026,6 +4026,8 @@ prepare_cmp_insn (rtx x, rtx y, enum rtx
>    /* Don't let both operands fail to indicate the mode.  */
>    if (GET_MODE (x) == VOIDmode && GET_MODE (y) == VOIDmode)
>      x = force_reg (mode, x);
> +  if (mode == VOIDmode)
> +    mode = GET_MODE (x) == VOIDmode ? GET_MODE (x) : GET_MODE (y);

I think you want
  mode = GET_MODE (x) == VOIDmode ? GET_MODE (y) : GET_MODE (x);
(swap x and y).


Ciao,
Michael.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]