SimplifyLibCalls: Add basic optimization of memchr calls.
authorBenjamin Kramer <benny.kra@googlemail.com>
Sat, 21 Mar 2015 15:36:21 +0000 (15:36 +0000)
committerBenjamin Kramer <benny.kra@googlemail.com>
Sat, 21 Mar 2015 15:36:21 +0000 (15:36 +0000)
commit4b74df72295e4336747b574514dbe72bac0fbd75
treee95391c769649f5b644465b81dc5636887cf71cf
parent046c58a3ee788680dceb058caef9512369db0732
SimplifyLibCalls: Add basic optimization of memchr calls.

This is just memchr(x, y, 0) -> nullptr and constant folding.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232896 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/ADT/StringRef.h
include/llvm/Transforms/Utils/SimplifyLibCalls.h
lib/Transforms/Utils/SimplifyLibCalls.cpp
test/Transforms/InstCombine/memchr.ll [new file with mode: 0644]