[llvm] [RISCV] Disable register overlap for vector indexed loads. (PR #220079)

Pengcheng Wang via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 1 20:59:30 PDT 2026


================
@@ -1898,9 +1898,10 @@ multiclass VPseudoILoad<bit Ordered> {
           defvar idxEMUL = !cast<LMULInfo>("V_" # IdxLInfo);
           defvar Vreg = dataEMUL.vrclass;
           defvar IdxVreg = idxEMUL.vrclass;
-          defvar HasConstraint = !ne(dataEEW, idxEEW);
-          defvar TypeConstraints = 
-            !if(!eq(dataEEW, idxEEW), 1, !if(!gt(dataEEW, idxEEW), !if(!ge(idxEMULOctuple, 8), 3, 1), 2));
+          // Don't allow overlapping registers even though it's allowed by the
+          // spec due to hardware issue on some CPUs.
+          defvar HasConstraint = true;
----------------
wangpc-pp wrote:

I discussed with my team and the conclusion is that this should be implementation-specific. We need a broader discussion.

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


More information about the llvm-commits mailing list