[llvm] [RISCV] Enabled masked interleaved access (PR #149981)
    Luke Lau via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Wed Jul 23 02:20:14 PDT 2025
    
    
  
================
@@ -1358,7 +1358,9 @@ class LoopVectorizationCostModel {
       return;
     // Override forced styles if needed.
     // FIXME: Investigate opportunity for fixed vector factor.
+    // FIXME: Support interleave accesses.
     bool EVLIsLegal = UserIC <= 1 && IsScalableVF &&
+                      !InterleaveInfo.hasGroups() &&
----------------
lukel97 wrote:
I think you're right. This looks like an underlying issue with mixing the header masks and EVL based IV. 
I think we need to convert the header masks from `icmp ule wide-canonical-iv, backedge-tc` to `icmp ult step-vector, EVL`. 
Because on the second-to-last iteration the original header mask isn't going to take into account the possible truncation. 
So on the first iteration, it should really be:
[0, 1, 2, 3] < 3 = [T, T, T, F]
And on the second iteration
[0, 1, 2, 3] < 2 = [T, T, F, F].
I'll create an issue for this, this is a good find.
https://github.com/llvm/llvm-project/pull/149981
    
    
More information about the llvm-commits
mailing list