[llvm] [LoopIdiomVectorize] Test all needles when vectorising find_first_of loops. (PR #179298)
David Sherwood via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 10 03:03:26 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);
----------------
david-arm wrote:
nit: This is also a LCSSA variable so probably good to add LCSSA at the end to maintain the same convention. However, you already have a `MatchPredLCSSA` below, so perhaps rename to something like `MatchPredAccLCSSA`?
https://github.com/llvm/llvm-project/pull/179298
More information about the llvm-commits
mailing list