The DAG combiner was performing a BT combine. The BT combine had a value of -1,
authorBill Wendling <isanbard@gmail.com>
Wed, 4 Mar 2009 00:18:06 +0000 (00:18 +0000)
committerBill Wendling <isanbard@gmail.com>
Wed, 4 Mar 2009 00:18:06 +0000 (00:18 +0000)
commit36ae6c182759871a4af71d9af85f970b29a669f1
tree76f7ebdf6942034a2aa5a3001aa850f90871970f
parent127a7936dea7b86e5cad337ad4b537bc115c2588
The DAG combiner was performing a BT combine. The BT combine had a value of -1,
so it changed it into a 31 via the TLO.ShrinkDemandedConstant() call. Then it
would go through the DAG combiner again. This time it had a value of 31, which
was turned into a -1 by TLI.SimplifyDemandedBits(). This would ping pong
forever.

Teach the TLO.ShrinkDemandedConstant() call not to lower a value if the demanded
value is an XOR of all ones.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65985 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/SelectionDAG/TargetLowering.cpp
test/CodeGen/X86/2009-03-03-BTHang.ll [new file with mode: 0644]