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

Luke Lau via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 3 05:20:44 PST 2024


================
@@ -1426,6 +1468,15 @@ void RISCVInsertVSETVLI::emitVSETVLIs(MachineBasicBlock &MBB) {
       PrefixTransparent = false;
     }
 
+    if (isVectorCopy(ST->getRegisterInfo(), MI)) {
+      if (!PrevInfo.isCompatible(DemandedFields::all(), CurInfo, LIS)) {
+        insertVSETVLI(MBB, MI, MI.getDebugLoc(), CurInfo, PrevInfo);
----------------
lukel97 wrote:

I'm not sure if it's useful to record the number of vsetvlis inserted specifically for copies since a lot of them will be coalesced away. I can try and get the diff in the total number of vsetvlis emitted (NumInsertedVSETVL - NumCoalescedVSETVL)

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


More information about the llvm-commits mailing list