On Tue, Jan 11, 2022 at 2:27 AM Xionghu Luo <luo...@linux.ibm.com> wrote: > > On 2022/1/11 06:55, David Edelsohn wrote: > >>> +(define_insn_and_split "sldoi_to_mov_<mode>" > > It would be more consistent with the naming convention to use > > "sldoi_to_mov<mode>" without the final "_". > > OK, thanks. > > > > >>> + [(set (match_operand:VM 0 "altivec_register_operand") > >>> + (unspec:VM [(match_operand:VM 1 "easy_vector_constant") > > Should this be "easy_vector_constant_vsldoi"? > > > This doesn't work. easy_vector_constant_vsldoi return false due to > vspltis_shifted "return 0" as: > > vspltis_shifted (rtx op): /* If all elements are equal, we don't need to > do VSLDOI. */ > > > (gdb) p op > $7 = (rtx_def *) (const_vector:V4SI [ > (const_int 0 [0]) repeated x4 > ]) > (gdb) p easy_vector_constant_vsldoi(op, V4SImode) > $8 = false > p easy_vector_constant(op, V4SImode) > $9 = true
Okay, thanks for checking. > > > > >>> + (match_dup 1) > >>> + (match_operand:VM 2 "u5bit_cint_operand")] > > This should be match_operand:QI, right? > > Yes. This patch is okay with the other changes. Thanks, David