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)
commitc0c2b1693237bd5c8ab93ab70ffd2214c0b9ef28
tree338918211da8dadd527ae8e30485ed46b5351817
parent3d510b3db842c40a0dba4ad4c6efda045bcc303a
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

llvm-svn: 188489
llvm/lib/Transforms/Utils/SimplifyLibCalls.cpp
llvm/test/Transforms/InstCombine/strchr-1.ll
llvm/test/Transforms/InstCombine/strrchr-1.ll