[llvm] [LoopIdiomVectorize] Preserve address space in FindFirstByte (PR #185226)

via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 10 18:51:12 PDT 2026


================
@@ -974,6 +974,45 @@ exit:
   ret ptr %res
 }
 
+; Same as @find_first_of_i8 but with non-zero address space pointers.
+; This verifies that the vectorized loop correctly preserves address spaces.
+define ptr addrspace(1) @find_first_of_i8_addrspace(ptr addrspace(1) %search_start, ptr addrspace(1) %search_end, ptr addrspace(1) %needle_start, ptr addrspace(1) %needle_end) #0 {
----------------
sweiglbosker wrote:

Good catch! This case actually wasn't actually handled correctly, should be good now.

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


More information about the llvm-commits mailing list