This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [rtl, i386] vec_merge simplification
- From: Eric Botcazou <ebotcazou at adacore dot com>
- To: Marc Glisse <marc dot glisse at inria dot fr>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Tue, 02 Apr 2013 09:53:33 +0200
- Subject: Re: [rtl, i386] vec_merge simplification
- References: <alpine dot DEB dot 2 dot 02 dot 1303170103230 dot 12359 at stedding dot saclay dot inria dot fr> <8694562 dot qGXxdu6rGm at polaris> <alpine dot DEB dot 2 dot 02 dot 1304010921390 dot 3880 at laptop-mg dot saclay dot inria dot fr>
> 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