Hi Souradipto,
Thanks for your patch.
Given its size I think it can be considered legally insignificant so we
won't be needing a DCO signoff or copyright assignment for now. We will
be needing one in the future as you contribute more.
For the record and in accordance with out AI policy, would you please
specify whether any LLM assistance was used for this patch?
> + /* Check if the beginning and end of the sequence corresponds to OP0
> and OP1 respectively */
> + if (!(known_eq (d->perm[0], vlen - slideup_cnt) && known_eq
> (d->perm[vlen - 1], 2 * vlen - 1 - slideup_cnt)))
> + return false;
> +
> }
>
> /* Check for a monotonic sequence with one or two pivots. */
> @@ -3842,7 +3847,7 @@ shuffle_slide_patterns (struct expand_vec_perm_d *d)
> && maybe_ne (d->perm[i], d->perm[i - 1] + 1))
> {
> /* A second pivot would indicate the vector length and is in OP0. */
> - if (known_ge (d->perm[i], vec_len) || pivot == -1 || len != 0)
> + if (known_ge (d->perm[i], vec_len) || pivot == -1 || len != 0 ||
> need_slideup_p)
> return false;
> len = i;
The conditions aren't getting any more intuitive :) but the change looks
correct to me.
> diff --git a/gcc/testsuite/gcc.target/riscv/rvv/base/bug126411.c
> b/gcc/testsuite/gcc.target/riscv/rvv/base/bug126411.c
> new file mode 100644
> index 00000000000..738d9247cab
> --- /dev/null
> +++ b/gcc/testsuite/gcc.target/riscv/rvv/base/bug126411.c
> @@ -0,0 +1,15 @@
> +/* { dg-do run { target { riscv_v } } } */
> +/* { dg-options "-march=rv64gcv -O0" } */
For a run test we need an effective-target check and riscv_v_ok. A
compile check might be a slightly more involved because we would need to
check for RTL but could work as well.
--
Regards
Robin