[llvm] [RISCV] Clear vill for whole vector register moves in vsetvli insertion (PR #118283)

Craig Topper via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 2 15:46:52 PST 2024


topperc wrote:

> > Do we need to add `Uses = [VTYPE]` to the whole register move instructions in RISCVInstrInfoV.td?
> 
> The whole register move instructions use `RVInstV` which already has `Uses = [VL, VTYPE]`, so I think they're safe.

Isn't the `Uses = []` overriding that?

```
foreach n = [1, 2, 4, 8] in {                                                    
  defvar vrc = !cast<VReg>(!if(!eq(n, 1), "VR", "VRM"#n));                       
  def VMV#n#R_V  : RVInstV<0b100111, !add(n, -1), OPIVI, (outs vrc:$vd),         
                           (ins vrc:$vs2), "vmv" # n # "r.v", "$vd, $vs2">,      
                   VMVRSched<n> {                                                
    let Uses = [];                                                               
    let vm = 1;                                                                  
  }                                                                              
}
```

https://github.com/llvm/llvm-project/pull/118283


More information about the llvm-commits mailing list