[PATCH] D68089: [InstCombine] Optimize some memccpy calls to memcpy/null
Eli Friedman via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 26 16:02:45 PDT 2019
efriedma added a comment.
> We dont even need to know n. If c is not in src, we have just memcpy(dst, src, n), no?
I think it's possible for there to be valid data after the array returned by getConstantStringInfo, in some cases. For example, if you're doing a memccpy out of something like `struct X { char a[10]; char b[10]; }`. Maybe worth adding a testcase.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D68089/new/
https://reviews.llvm.org/D68089
More information about the llvm-commits
mailing list