Add more analysis of the sign bit of an srem instruction. If the LHS is negative
commitc14bc77315ac4867f16c1585181b41919339eb3c
authorNick Lewycky <nicholas@mxc.ca>
Mon, 7 Mar 2011 01:50:10 +0000 (7 01:50 +0000)
committerNick Lewycky <nicholas@mxc.ca>
Mon, 7 Mar 2011 01:50:10 +0000 (7 01:50 +0000)
treea5613a37365664d1bf1f6352f4e7fea7c0b4893b
parent128ccbb8e5e142d4ec6c9afb4160b74f76cb3064
Add more analysis of the sign bit of an srem instruction. If the LHS is negative
then the result could go either way. If it's provably positive then so is the
srem. Fixes PR9343 #7!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127146 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Analysis/ValueTracking.cpp
lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp
test/Transforms/InstCombine/icmp.ll