This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix PR38968, missed vectorization with "negative" misalignment
On Mon, 26 Jan 2009, Richard Guenther wrote:
> On Mon, 26 Jan 2009, Paolo Bonzini wrote:
>
> >
> > > && DECL_ALIGN (base) >= TYPE_ALIGN (vectype)));
> > >
> > > ! /* Modulo alignment. For negative initial offsets adjust the
> > > ! misalign value accordingly. */
> > > misalign = size_binop (TRUNC_MOD_EXPR, misalign, alignment);
> >
> > You just need FLOOR_MOD_EXPR here.
>
> Are you sure?
>
> case FLOOR_DIV_EXPR:
> case FLOOR_MOD_EXPR: /* round toward negative infinity */
> if (quo_neg && (*lrem != 0 || *hrem != 0)) /* ratio < 0 && rem !=
> 0 */
> {
> /* quo = quo - 1; */
> add_double (*lquo, *hquo, (HOST_WIDE_INT) -1, (HOST_WIDE_INT)
> -1,
> lquo, hquo);
> }
>
> this seems to do a different thing.
Doh. Nevermind. Thanks for the suggestion.
Richard.