Thanks for explaining, LGTM :)
On Mon, Sep 4, 2023 at 11:39 PM Lehua Ding <lehua.d...@rivai.ai> wrote: > > Hi Kito, > > > Can those intermediate patterns be used for intrinsic? I would prefer > > to keep those stuff *IF* possible used for intrinsics. > > I think we don't need those patterns for intrinisc. First, the deleted > pattern does not directly correspond to intrinisc. Second, if you want > to use these patterns to optimize the following intrinisc program (e.g. > combine to a single vwadd.vv instruction), we'd better fold them > directly into the internal function of autovec in Gimple IR. > > vint32m1_t foo(vint16mf2_t va1, vint16mf2_t vb1) { > vint32m1_t va2 = __riscv_vsext_vf2_i32m1(va1, > __riscv_vsetvlmax_e32m1()); > vint32m1_t vb2 = __riscv_vsext_vf2_i32m1(vb1, > __riscv_vsetvlmax_e32m1()); > vint32m1_t vc = __riscv_vadd_vv_i32m1(va2, vb2, > __riscv_vsetvlmax_e32m1()); > return vc; > } > -- > Best, > Lehua > >