[PATCH] D50233: [InstCombine] Transform str(n)cmp to memcmp
Eli Friedman via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 4 13:00:28 PDT 2018
efriedma added a comment.
> But that also implies that you have to emit an inline implementation since you might not control what the implementation of memcmp supplied by libc does?
Assuming there isn't a data race, the libc implementation of memcmp can't actually do anything undefined. In assembly, "uninitialized" data always has some fixed value.
-------------
Given the problems here, we probably want to move this transform to the ExpandMemCmp pass, and only transform when we'll expand the compare inline.
Repository:
rL LLVM
https://reviews.llvm.org/D50233
More information about the llvm-commits
mailing list