OSDN Git Service

Fixing a corner-case bug in strchr and strrchr lib call optimizations where
authorYunzhong Gao <Yunzhong_Gao@playstation.sony.com>
Thu, 15 Aug 2013 20:58:59 +0000 (20:58 +0000)
committerYunzhong Gao <Yunzhong_Gao@playstation.sony.com>
Thu, 15 Aug 2013 20:58:59 +0000 (20:58 +0000)
commitb187b69170ec50fa8cf9d434ae204b86b8eb4339
tree02b37180e3f1885b2499c9061f5e4ac698ff45f5
parent14c41370e36068ae25c871d5bd8f99f92bbb7d45
Fixing a corner-case bug in strchr and strrchr lib call optimizations where
the input character is not converted to char before comparing with zero.

The patch was discussed in this thread:
http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20130812/184069.html

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188489 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Utils/SimplifyLibCalls.cpp
test/Transforms/InstCombine/strchr-1.ll
test/Transforms/InstCombine/strrchr-1.ll