Re: [PATCH] vect: Fix up lowering of TRUNC_MOD_EXPR by negative constant [PR94524]

2020-04-08 Thread Richard Biener
On April 8, 2020 8:14:56 PM GMT+02:00, Jakub Jelinek wrote: >Hi! > >The first testcase below is miscompiled, because for the division part >of the lowering we canonicalize negative divisors to their absolute >value >(similarly how expmed.c canonicalizes it), but when multiplying the >division >res

[PATCH] vect: Fix up lowering of TRUNC_MOD_EXPR by negative constant [PR94524]

2020-04-08 Thread Jakub Jelinek via Gcc-patches
Hi! The first testcase below is miscompiled, because for the division part of the lowering we canonicalize negative divisors to their absolute value (similarly how expmed.c canonicalizes it), but when multiplying the division result back by the VECTOR_CST, we use the original constant, which can c