This is the mail archive of the gcc-patches@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: [rtl, i386] vec_merge simplification


> By the way, shouldn't this be:
> 
> unsigned HOST_WIDE_INT mask = ((unsigned HOST_WIDE_INT) 2 << (n_elts - 1)) -
> 1;
> 
> so it doesn't cause undefined behavior for V64QI?

You're right, but I think that we'd rather write:

  if (n_elts == HOST_BITS_PER_WIDE_INT)
    mask = -1;
  else
    mask = ((unsigned HOST_WIDE_INT) 1 << n_elts) - 1;

in that case.

-- 
Eric Botcazou


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