mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-12-30 07:33:23 +00:00
Don't use a BT instruction if the AND has multiple uses.
llvm-svn: 62195
This commit is contained in:
parent
8c835f6285
commit
9c2ee40c1c
@ -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