[llvm] [memcpyopt] handle memcpy from memset in more cases (PR #140954)
Jameson Nash via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 10 09:12:41 PDT 2025
================
@@ -1403,6 +1404,24 @@ static bool hasUndefContents(MemorySSA *MSSA, BatchAAResults &AA, Value *V,
return false;
}
+static bool coversInputFully(MemorySSA *MSSA, MemCpyInst *MemCpy,
+ MemIntrinsic *MemSrc, BatchAAResults &BAA) {
----------------
vtjnash wrote:
The CanReduceSize bool is actually a property of having both sizes be constants (the other conditional here). If they aren't constants, then you cannot reduce the size, though this query and this optimization are still okay
https://github.com/llvm/llvm-project/pull/140954
More information about the llvm-commits
mailing list