[llvm] [LoopIdiomVectorize] Test all needles when vectorising find_first_of loops. (PR #179298)

Ricardo Jesus via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 10 05:18:02 PST 2026


================
@@ -1364,14 +1368,17 @@ Value *LoopIdiomVectorize::expandFindFirstByte(
   Search->addIncoming(SearchStart, BB0);
   Search->addIncoming(NextSearch, BB5);
   Needle->addIncoming(NeedleStart, BB1);
-  Needle->addIncoming(NextNeedle, BB4);
+  Needle->addIncoming(NextNeedle, BB2);
+  Match->addIncoming(MatchInit, BB1);
+  Match->addIncoming(MatchAcc, BB2);
   // These are needed to retain LCSSA form.
-  MatchLCSSA->addIncoming(Search, BB2);
-  MatchPredLCSSA->addIncoming(MatchPred, BB2);
+  MatchPred->addIncoming(MatchAcc, BB2);
----------------
rj-jesus wrote:

Thanks, I've renamed `MatchPred` in the latest commit (and replaced `MatchPred->getType()` with `PredVTy` where the former was used). 

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


More information about the llvm-commits mailing list