On Tue, 2025-02-11 at 16:52 +0800, Lulu Cheng wrote: > > 在 2025/2/7 下午8:09, Xi Ruoyao 写道: > /* snip */ > > - > > -(define_insn "lasx_xvpickev_w" > > - [(set (match_operand:V8SI 0 "register_operand" "=f") > > - (vec_select:V8SI > > - (vec_concat:V16SI > > - (match_operand:V8SI 1 "register_operand" "f") > > - (match_operand:V8SI 2 "register_operand" "f")) > > - (parallel [(const_int 0) (const_int 2) > > - (const_int 8) (const_int 10) > > - (const_int 4) (const_int 6) > > - (const_int 12) (const_int 14)])))] > > - "ISA_HAS_LASX" > > - "xvpickev.w\t%u0,%u2,%u1" > > - [(set_attr "type" "simd_permute") > > - (set_attr "mode" "V8SI")]) > > - > /* snip */ > > +;; Picking even/odd elements. > > +(define_insn "simd_pick_evod_<mode>" > > + [(set (match_operand:ALLVEC 0 "register_operand" "=f") > > + (vec_select:ALLVEC > > + (vec_concat:<LVEC> > > + (match_operand:ALLVEC 1 "register_operand" "f") > > + (match_operand:ALLVEC 2 "register_operand" "f")) > > + (match_operand:<LVEC> 3 "vect_par_cnst_even_or_odd_half")))] > > For LASX, the generated select array is problematic, taking xvpickev.w > as an example: > > xvpickev.w vd,vj,vk > > The behavior of the instruction is as follows: > > vd.w[0] = vk.w[0] > > vd.w[1] = vk.w[2] > > vd.w[2] = vj.w[0] > > vd.w[3] = vj.w[2] > > vd.w[4] = vk.w[4] > > vd.w[5] = vk.w[6] > > vd.w[6] = vj.w[4] > > vd.w[7] = vj.w[6]
Oops stupid I. Strangely the bootstrapping (even with BOOT_CFLAGS="-O2 -g -march=la664") and regtesting cannot catch it. I'll limit this to LSX in v2. -- Xi Ruoyao <xry...@xry111.site> School of Aerospace Science and Technology, Xidian University