On Sun, 10 Aug 2025 07:29:25 PDT (-0700), jeffreya...@gmail.com wrote:


On 8/4/25 3:09 AM, Robin Dapp wrote:
Hi,

In PR121334 we are asked to expand a const_vector of size 4 with
poly_int elements.  It has 2 elts per pattern so is neither a
const_vector_duplicate nor a const_vector_stepped.

We don't allow this kind of constant in legitimate_constant_p but expr
apparently still wants us to expand it under certain conditions.

This patch implements a basic expander for such kinds of patterns.
As slide1up is used to build the individual vectors it also adds
a helper function expand_slide1up.

I regtested on rv64gcv_zvl512b but unfortunately the newly created
pattern is not even executed.  I tried some variations of the original
code but didn't manage to trigger it.

Regards
Robin

     PR target/121334

gcc/ChangeLog:

     * config/riscv/riscv-v.cc (expand_slide1up): New function.
     (expand_vector_init_trailing_same_elem): Use new function.
     (expand_const_vector_onestep): New function.
     (expand_const_vector): Uew expand_slide1up.
     (expand_vector_init_merge_repeating_sequence): Ditto.
     (shuffle_off_by_one_patterns): Ditto.

gcc/testsuite/ChangeLog:

     * gcc.target/riscv/rvv/autovec/pr121334.c: New test.
---
OK

This is the one git was complaining about on your end? b4 gets it for me via

   b4 shazam 
https://inbox.sourceware.org/gcc-patches/dbtiy6uch8xb.3522x0caqi...@gmail.com/

it's a little mangled: the "Hi," is in there, and there's two different line-breaking lengths. So maybe something's odd with the patch, b4 is pretty good about just making stuff apply when it's been a bit mangled.

Reply via email to