Re: [PATCH v2 13/14] tcg/riscv: Implement vector roti/v/x shi ops

2024-09-04 Thread LIU Zhiwei
On 2024/9/5 3:05, Richard Henderson wrote: On 9/4/24 08:25, LIU Zhiwei wrote: I'm trying to work out how much benefit there is here of expanding these early, as opposed to simply using TCG_REG_TMP0 when the immediate doesn't fit, We find for rotli,  it just copied code from the implementati

Re: [PATCH v2 13/14] tcg/riscv: Implement vector roti/v/x shi ops

2024-09-04 Thread Richard Henderson
On 9/4/24 08:25, LIU Zhiwei wrote: I'm trying to work out how much benefit there is here of expanding these early, as opposed to simply using TCG_REG_TMP0 when the immediate doesn't fit, We find for rotli,  it just copied code from the implementation of INDEX_op_shli_vec and INDEX_op_shri_vec

Re: [PATCH v2 13/14] tcg/riscv: Implement vector roti/v/x shi ops

2024-09-04 Thread LIU Zhiwei
On 2024/9/3 23:15, Richard Henderson wrote: On 8/29/24 23:16, LIU Zhiwei wrote: @@ -2589,6 +2605,69 @@ void tcg_expand_vec_op(TCGOpcode opc, TCGType type, unsigned vece,   }   }   break; +    case INDEX_op_shli_vec: +    if (a2 > 31) { +    tcg_gen_shls_

Re: [PATCH v2 13/14] tcg/riscv: Implement vector roti/v/x shi ops

2024-09-03 Thread Richard Henderson
On 8/29/24 23:16, LIU Zhiwei wrote: @@ -2589,6 +2605,69 @@ void tcg_expand_vec_op(TCGOpcode opc, TCGType type, unsigned vece, } } break; +case INDEX_op_shli_vec: +if (a2 > 31) { +tcg_gen_shls_vec(vece, v0, v1, tcg_constant_i32(a2)); +