mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-11-01 15:11:24 +00:00
Don't use a BT instruction if the AND has multiple uses.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62195 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
f31408d75c
commit
286575c65c
@ -5034,7 +5034,9 @@ SDValue X86TargetLowering::LowerSETCC(SDValue Op, SelectionDAG &DAG) {
|
||||
// Lower ((X >>u N) & 1) != 0 to BT.
|
||||
// Lower ((X >>s N) & 1) != 0 to BT.
|
||||
// FIXME: Is i386 or later or available only on some chips?
|
||||
if (Op0.getOpcode() == ISD::AND && Op1.getOpcode() == ISD::Constant &&
|
||||
if (Op0.getOpcode() == ISD::AND &&
|
||||
Op0.hasOneUse() &&
|
||||
Op1.getOpcode() == ISD::Constant &&
|
||||
Op0.getOperand(1).getOpcode() == ISD::Constant &&
|
||||
(CC == ISD::SETEQ || CC == ISD::SETNE)) {
|
||||
ConstantSDNode *AndRHS = cast<ConstantSDNode>(Op0.getOperand(1));
|
||||
|
Loading…
Reference in New Issue
Block a user