Hi Juzhe,

> Could you show me what the codegen looks like after this patch ?> I would be 
> expecting the codegen become:
> 
> foo:
>         vsetvli a5,a0,e16,m1,ta,ma
>         vmv.x.s a4,v8
>         vadd.vx v9,v8,a4
>         vsetvli zero,a5,e16,m1,ta,ma
>         vadd.vv v8,v9,v8
>         ret
> Or:
> foo:
>         vsetvli zero,a0,e16,m1,ta,ma
>         vmv.x.s a4,v8
>         vadd.vx v9,v8,a4
>         vadd.vv v8,v9,v8
>         ret
> are both correct.

The former one with two vsetvli instructions is generated after the patch.

> Also, I think it's better add assembly check in the testcase in stead of just 
> adding "Eliminate insn" "vsetvl"

Okay.

Thanks,
Bohan

Reply via email to