instcombine: Migrate strchr and strrchr optimizations
authorMeador Inge <meadori@codesourcery.com>
Sat, 13 Oct 2012 16:45:37 +0000 (16:45 +0000)
committerMeador Inge <meadori@codesourcery.com>
Sat, 13 Oct 2012 16:45:37 +0000 (16:45 +0000)
commit186f8d90df976349481ccf8c8e24c37c6ec5ffb4
treec1380c85f364003fb8bd41d261e33e90d862877d
parent73d8a5864fe8c52be2b710c10ec155019738aad5
instcombine: Migrate strchr and strrchr optimizations

This patch migrates the strchr and strrchr optimizations from the
simplify-libcalls pass into the instcombine library call simplifier.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165875 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Scalar/SimplifyLibCalls.cpp
lib/Transforms/Utils/SimplifyLibCalls.cpp
test/Transforms/InstCombine/strchr-1.ll [new file with mode: 0644]
test/Transforms/InstCombine/strchr-2.ll [new file with mode: 0644]
test/Transforms/InstCombine/strrchr-1.ll [new file with mode: 0644]
test/Transforms/InstCombine/strrchr-2.ll [new file with mode: 0644]
test/Transforms/SimplifyLibCalls/StrChr.ll [deleted file]
test/Transforms/SimplifyLibCalls/StrRChr.ll [deleted file]