Clean up previous cast optimization a bit. Also make zext elimination a bit more...
authorEvan Cheng <evan.cheng@apple.com>
Fri, 16 Jan 2009 02:11:43 +0000 (02:11 +0000)
committerEvan Cheng <evan.cheng@apple.com>
Fri, 16 Jan 2009 02:11:43 +0000 (02:11 +0000)
commit4e56ab2cf4ef7dc693b6110df60ce2a07187868f
tree20449b7813fb2b6fe368b2d79aa71440ceff5ec3
parent05aae18165a41e2bb0e7de0eba2656cc5537b162
Clean up previous cast optimization a bit. Also make zext elimination a bit more aggressive: if it's not necessary to emit an AND (i.e. high bits are already zero), it's profitable to evaluate the operand at a different type.

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