[llvm] [InterleavedAccess] Construct interleaved access store with shuffles (PR #164000)
    Rajveer Singh Bharadwaj via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Wed Oct 22 03:49:00 PDT 2025
    
    
  
================
@@ -18023,11 +18024,17 @@ bool AArch64TargetLowering::lowerInterleavedStore(Instruction *Store,
                                                   unsigned Factor,
                                                   const APInt &GapMask) const {
 
-  assert(Factor >= 2 && Factor <= getMaxSupportedInterleaveFactor() &&
-         "Invalid interleave factor");
   auto *SI = dyn_cast<StoreInst>(Store);
   if (!SI)
     return false;
+
+  if (isProfitableToInterleaveWithGatherScatter() &&
+      Factor > getMaxSupportedInterleaveFactor())
+    return lowerInterleavedStoreWithShuffle(SI, SVI, Factor);
+
+  assert(Factor >= 2 && Factor <= getMaxSupportedInterleaveFactor() &&
+         "Invalid interleave factor");
----------------
Rajveer100 wrote:
I think we can get rid of this condition since we already check `Factor > getMaxSupportedInterleaveFactor()` above.
```suggestion
  assert(Factor >= 2 && "Invalid interleave factor");
```
https://github.com/llvm/llvm-project/pull/164000
    
    
More information about the llvm-commits
mailing list