[llvm] [LoopIdiomVectorize] Preserve address space in FindFirstByte (PR #185226)
Ricardo Jesus via llvm-commits
llvm-commits at lists.llvm.org
Mon Mar 9 02:31:47 PDT 2026
================
@@ -1206,7 +1206,7 @@ Value *LoopIdiomVectorize::expandFindFirstByte(
Value *SearchStart, Value *SearchEnd, Value *NeedleStart,
Value *NeedleEnd) {
// Set up some types and constants that we intend to reuse.
- auto *PtrTy = Builder.getPtrTy();
+ auto *PtrTy = SearchStart->getType();
----------------
rj-jesus wrote:
Since there's only one use of `PtrTy`, perhaps it's safer to remove it and use the Search pointer type inline?
```
PHINode *MatchLCSSA = Builder.CreatePHI(SearchStart->getType(), ...
```
https://github.com/llvm/llvm-project/pull/185226
More information about the llvm-commits
mailing list