Hi!
On 2025-10-27T16:12:17+0000, Andrew Stubbs <[email protected]> wrote:
> On 24/10/2025 06:15, Avinash Jayakar wrote:
>> For the signed mod case, there is an extra requirement for
>> vectorization that is to have vector operation support for ABS_EXPR,
>> which amdgcn does not have.
> I've just pushed a patch for this (attached). In fact I found that the
> hardware cannot do integer ABS in one instruction, but the masked
> instruction sequence in the backend is probably better than the
> subtract-and-merge the vectorizer will do.
>
> The issue should be fixed now.
Confirmed:
PASS: gcc.dg/vect/pr104116-round-div-2.c (test for excess errors)
PASS: gcc.dg/vect/pr104116-round-div-2.c execution test
[-FAIL:-]{+PASS:+} gcc.dg/vect/pr104116-round-div-2.c scan-tree-dump-times
vect "optimized: loop vectorized" 1
PASS: gcc.dg/vect/pr104116-round-div-pow2.c (test for excess errors)
PASS: gcc.dg/vect/pr104116-round-div-pow2.c execution test
[-FAIL:-]{+PASS:+} gcc.dg/vect/pr104116-round-div-pow2.c
scan-tree-dump-times vect "optimized: loop vectorized" 1
PASS: gcc.dg/vect/pr104116-round-div.c (test for excess errors)
PASS: gcc.dg/vect/pr104116-round-div.c execution test
[-FAIL:-]{+PASS:+} gcc.dg/vect/pr104116-round-div.c scan-tree-dump-times
vect "optimized: loop vectorized" 1
PASS: gcc.dg/vect/pr104116-round-mod-2.c (test for excess errors)
PASS: gcc.dg/vect/pr104116-round-mod-2.c execution test
[-FAIL:-]{+PASS:+} gcc.dg/vect/pr104116-round-mod-2.c scan-tree-dump-times
vect "optimized: loop vectorized" 1
PASS: gcc.dg/vect/pr104116-round-mod-pow2.c (test for excess errors)
PASS: gcc.dg/vect/pr104116-round-mod-pow2.c execution test
[-FAIL:-]{+PASS:+} gcc.dg/vect/pr104116-round-mod-pow2.c
scan-tree-dump-times vect "optimized: loop vectorized" 1
PASS: gcc.dg/vect/pr104116-round-mod.c (test for excess errors)
PASS: gcc.dg/vect/pr104116-round-mod.c execution test
[-FAIL:-]{+PASS:+} gcc.dg/vect/pr104116-round-mod.c scan-tree-dump-times
vect "optimized: loop vectorized" 1
No other visible change in GCC/GCN test suite results.
Grüße
Thomas