[llvm] [LV] Use getFixedValue instead of getKnownMinValue when appropriate (PR #143526)

Florian Hahn via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 10 07:17:50 PDT 2025


================
@@ -3508,13 +3507,12 @@ void VPInterleaveRecipe::execute(VPTransformState &State) {
         continue;
 
       auto StrideMask =
-          createStrideMask(I, InterleaveFactor, State.VF.getKnownMinValue());
+          createStrideMask(I, InterleaveFactor, State.VF.getFixedValue());
       Value *StridedVec =
           State.Builder.CreateShuffleVector(NewLoad, StrideMask, "strided.vec");
 
       // If this member has different type, cast the result type.
       if (Member->getType() != ScalarTy) {
-        assert(!State.VF.isScalable() && "VF is assumed to be non scalable.");
----------------
fhahn wrote:

I guess it would be fine to drop this here as it is covered by the getFixedValue above, but it may be clearer to keep the assert here or add it somewhere above?

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


More information about the llvm-commits mailing list