Three changes:
authorChris Lattner <sabre@nondot.org>
Sun, 12 Feb 2006 02:07:56 +0000 (02:07 +0000)
committerChris Lattner <sabre@nondot.org>
Sun, 12 Feb 2006 02:07:56 +0000 (02:07 +0000)
commitbf5d8a82707bb89f22e4c0f26c62111796d5f1c3
tree4f3d746d432a594ef8a8d319e52d21b50d0ea030
parente7df1a27f93b9133ef69b7e46083063d021d89bf
Three changes:
1. Teach GetConstantInType to handle boolean constants.
2. Teach instcombine to fold (compare X, CST) when X has known 0/1 bits.
   Testcase here: set.ll:test22
3. Improve the "(X >> c1) & C2 == 0" folding code to allow a noop cast
   between the shift and and.  More aggressive bitfolding for other reasons
   was turning signed shr's into unsigned shr's, leaving the noop cast in
   the way.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26131 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Scalar/InstructionCombining.cpp