[llvm] [RISCV] Mark vmvNr.v as implicitly using vtype (PR #118414)
Min-Yih Hsu via llvm-commits
llvm-commits at lists.llvm.org
Tue Dec 3 15:35:24 PST 2024
mshockwave wrote:
> > > I had to update the llvm-mca tests, I'm not sure why adding a use affects the number of cycles. cc @mshockwave
> >
> >
> > LGTM as well, the mca change is at least reasonable if we're modeling a new runtime dependency which wasn't previously being modeled.
>
> Looking at the test. There are vsetvlis interleaved with vmv. So I assume llvm-mca is now waiting for the preceding vsetvli before it can start a vmv.
Correct, this is the timeline before:
```
Index 0123456789 0123456789 0123456789 0123456789
[0,0] DeER . . . . . . . . . . . . . . . . vsetvli zero, zero, e8, mf8, tu, mu
[0,1] DeeER. . . . . . . . . . . . . . . . vmv1r.v v8, v16
[0,2] D=eER. . . . . . . . . . . . . . . . vsetvli zero, zero, e8, mf4, tu, mu
[0,3] .DeeER . . . . . . . . . . . . . . . vmv1r.v v8, v16
[0,4] .D=eER . . . . . . . . . . . . . . . vsetvli zero, zero, e8, mf2, tu, mu
[0,5] .D=eeER . . . . . . . . . . . . . . . vmv1r.v v8, v16
[0,6] . D=eER . . . . . . . . . . . . . . . vsetvli zero, zero, e8, m1, tu, mu
[0,7] . D=eeER . . . . . . . . . . . . . . . vmv1r.v v8, v16
[0,8] . D==eER . . . . . . . . . . . . . . . vsetvli zero, zero, e8, m1, tu, mu
[0,9] . D=eeER . . . . . . . . . . . . . . . vmv1r.v v8, v16
[0,10] . D==eER . . . . . . . . . . . . . . . vsetvli zero, zero, e8, m2, tu, mu
[0,11] . D==eeER. . . . . . . . . . . . . . . vmv1r.v v8, v16
```
And this is the one after:
```
Index 0123456789 0123456789 0123456789 0123456789
[0,0] DeER . . . . . . . . . . . . . . . . vsetvli zero, zero, e8, mf8, tu, mu
[0,1] D=eeER . . . . . . . . . . . . . . . vmv1r.v v8, v16
[0,2] D=eE-R . . . . . . . . . . . . . . . vsetvli zero, zero, e8, mf4, tu, mu
[0,3] .D=eeER . . . . . . . . . . . . . . . vmv1r.v v8, v16
[0,4] .D=eE-R . . . . . . . . . . . . . . . vsetvli zero, zero, e8, mf2, tu, mu
[0,5] .D==eeER . . . . . . . . . . . . . . . vmv1r.v v8, v16
[0,6] . D=eE-R . . . . . . . . . . . . . . . vsetvli zero, zero, e8, m1, tu, mu
[0,7] . D==eeER . . . . . . . . . . . . . . . vmv1r.v v8, v16
[0,8] . D==eE-R . . . . . . . . . . . . . . . vsetvli zero, zero, e8, m1, tu, mu
[0,9] . D==eeER. . . . . . . . . . . . . . . vmv1r.v v8, v16
[0,10] . D==eE-R. . . . . . . . . . . . . . . vsetvli zero, zero, e8, m2, tu, mu
[0,11] . D===eeER . . . . . . . . . . . . . . vmv1r.v v8, v16
```
vmvNr no longer can be issued at the same cycle with vsetvli.
https://github.com/llvm/llvm-project/pull/118414
More information about the llvm-commits
mailing list