OSDN Git Service

[SelectionDAG][X86] CombineBT - more aggressively determine demanded bits
authorSimon Pilgrim <llvm-dev@redking.me.uk>
Sat, 29 Jul 2017 14:50:25 +0000 (14:50 +0000)
committerSimon Pilgrim <llvm-dev@redking.me.uk>
Sat, 29 Jul 2017 14:50:25 +0000 (14:50 +0000)
commite4f61531677de6d59c6410d2b4147c9e6e166b5f
treef53498c7fdb9f72d89d3c5e3073a1f80206bee1b
parent92f74f20bf31413b422d2a8b00dc0ba2130a4737
[SelectionDAG][X86] CombineBT - more aggressively determine demanded bits

This patch is in 2 parts:

1 - replace combineBT's use of SimplifyDemandedBits (hasOneUse only) with SelectionDAG::GetDemandedBits to more aggressively determine the lower bits used by BT.

2 - update SelectionDAG::GetDemandedBits to support ANY_EXTEND - if the demanded bits are only in the non-extended portion, then peek through and demand from the source value and then ANY_EXTEND that if we found a match.

Differential Revision: https://reviews.llvm.org/D35896

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@309486 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/SelectionDAG/SelectionDAG.cpp
lib/Target/X86/X86ISelLowering.cpp
test/CodeGen/X86/bt.ll