[llvm] [VectorCombine] Align shrinkLoadForShuffles to register boundaries (PR #209775)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 21 07:34:20 PDT 2026


================
@@ -6246,9 +6246,41 @@ bool VectorCombine::shrinkLoadForShuffles(Instruction &I) {
     return OutputRange;
   };
 
+  // Compute the new number of elements, aligning to vector register
+  // boundaries for fixed-width vectors to avoid non-power-of-2 remainders
+  // that legalize poorly.
+  auto GetAlignedNumElements = [&](unsigned MaxIdx,
----------------
arsenm wrote:

This is big for a lambda, move to utility function? 

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


More information about the llvm-commits mailing list