[llvm] [IR] Fix canReplacePointersIfEqual to properly validate vector pointers (PR #174142)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 1 10:14:47 PST 2026
================
@@ -842,12 +842,56 @@ static bool isPointerAlwaysReplaceable(const Value *From, const Value *To,
getUnderlyingObjectAggressive(To);
}
+// Return true if all element of vector `To` is AlwaysReplaceable
+static bool CheckVectorPtrAlwaysReplaceable(const Value *From, const Value *To,
----------------
nikic wrote:
I don't think this is worth the bother. I'd just add a `isPointerTy()` check before calling isDereferenceablePointer().
https://github.com/llvm/llvm-project/pull/174142
More information about the llvm-commits
mailing list