Index: lib/Transforms/Vectorize/LoopVectorize.cpp =================================================================== --- lib/Transforms/Vectorize/LoopVectorize.cpp +++ lib/Transforms/Vectorize/LoopVectorize.cpp @@ -6099,13 +6099,12 @@ // If the user doesn't provide a vectorization factor, determine a // reasonable one. if (!UserVF) { - // We set VF to 4 for stress testing. - if (VPlanBuildStressTest) - VF = 4; - else VF = determineVPlanVF(TTI->getRegisterBitWidth(true /* Vector*/), CM); - } + // Make sure we have a VF > 1 for stress testing. + if (VPlanBuildStressTest && VF < 2) + VF = 4; + } assert(EnableVPlanNativePath && "VPlan-native path is not enabled."); assert(isPowerOf2_32(VF) && "VF needs to be a power of two"); LLVM_DEBUG(dbgs() << "LV: Using " << (UserVF ? "user VF " : "computed VF ")