summaryrefslogtreecommitdiffstats
path: root/llvm/test/Transforms/InstCombine/strcmp-memcmp.ll
Commit message (Collapse)AuthorAgeFilesLines
* [InstCombine] Disable strcmp->memcmp transform for MSan.Matt Morehouse2018-09-191-0/+15
| | | | | | | | | | | | | | | | | | Summary: The strcmp->memcmp transform can make the resulting memcmp read uninitialized data, which MSan doesn't like. Resolves https://github.com/google/sanitizers/issues/993. Reviewers: eugenis, xbolva00 Reviewed By: eugenis Subscribers: hiraditya, llvm-commits Differential Revision: https://reviews.llvm.org/D52272 llvm-svn: 342582
* [InstCombine] Transform str(n)cmp to memcmpDavid Bolvansky2018-08-101-48/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Motivation examples: int strcmp_memcmp() { char buf[12]; return strcmp(buf, "key") == 0; } int strcmp_memcmp2() { char buf[12]; return strcmp(buf, "key") != 0; } int strncmp_memcmp() { char buf[12]; return strncmp(buf, "key", 3) == 0; } can be turned to memcmp. See test file for more cases. Reviewers: efriedma Reviewed By: efriedma Subscribers: spatel, llvm-commits Differential Revision: https://reviews.llvm.org/D50233 llvm-svn: 339410
* [InstCombine] [NFC] Tests for strcmp to memcmp transformationDavid Bolvansky2018-08-051-0/+545
llvm-svn: 338963
OpenPOWER on IntegriCloud