OSDN Git Service

Don't assume that a left-shift of a value with one bit set will have
authorDan Gohman <gohman@apple.com>
Sun, 15 Feb 2009 23:59:32 +0000 (23:59 +0000)
committerDan Gohman <gohman@apple.com>
Sun, 15 Feb 2009 23:59:32 +0000 (23:59 +0000)
commit97d116346cdf47ce0c8536a69ff6c606309cb4c0
tree4c66333d17b3415da1f8ef940e2bf00aa32807ce
parent35188eb54db0df31a11bc2227292170d987efe1a
Don't assume that a left-shift of a value with one bit set will have
one bit set, because the bit may be shifted off the end. Instead,
just check for a constant 1 being shifted. This is still sufficient
to handle all the cases in test/CodeGen/X86/bt.ll. This fixes PR3583.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64622 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/SelectionDAG/TargetLowering.cpp