[X86][SSE] Tidyup with implicit SDValue bool check. NFC.
llvm-svn: 253171
This commit is contained in:
parent
83d03ddbf6
commit
cbba348ae7
|
|
@ -14524,8 +14524,7 @@ SDValue X86TargetLowering::LowerSETCC(SDValue Op, SelectionDAG &DAG) const {
|
||||||
Op1.getOpcode() == ISD::Constant &&
|
Op1.getOpcode() == ISD::Constant &&
|
||||||
cast<ConstantSDNode>(Op1)->isNullValue() &&
|
cast<ConstantSDNode>(Op1)->isNullValue() &&
|
||||||
(CC == ISD::SETEQ || CC == ISD::SETNE)) {
|
(CC == ISD::SETEQ || CC == ISD::SETNE)) {
|
||||||
SDValue NewSetCC = LowerToBT(Op0, CC, dl, DAG);
|
if (SDValue NewSetCC = LowerToBT(Op0, CC, dl, DAG)) {
|
||||||
if (NewSetCC.getNode()) {
|
|
||||||
if (VT == MVT::i1)
|
if (VT == MVT::i1)
|
||||||
return DAG.getNode(ISD::TRUNCATE, dl, MVT::i1, NewSetCC);
|
return DAG.getNode(ISD::TRUNCATE, dl, MVT::i1, NewSetCC);
|
||||||
return NewSetCC;
|
return NewSetCC;
|
||||||
|
|
@ -14846,8 +14845,7 @@ SDValue X86TargetLowering::LowerSELECT(SDValue Op, SelectionDAG &DAG) const {
|
||||||
// We know the result of AND is compared against zero. Try to match
|
// We know the result of AND is compared against zero. Try to match
|
||||||
// it to BT.
|
// it to BT.
|
||||||
if (Cond.getOpcode() == ISD::AND && Cond.hasOneUse()) {
|
if (Cond.getOpcode() == ISD::AND && Cond.hasOneUse()) {
|
||||||
SDValue NewSetCC = LowerToBT(Cond, ISD::SETNE, DL, DAG);
|
if (SDValue NewSetCC = LowerToBT(Cond, ISD::SETNE, DL, DAG)) {
|
||||||
if (NewSetCC.getNode()) {
|
|
||||||
CC = NewSetCC.getOperand(0);
|
CC = NewSetCC.getOperand(0);
|
||||||
Cond = NewSetCC.getOperand(1);
|
Cond = NewSetCC.getOperand(1);
|
||||||
addTest = false;
|
addTest = false;
|
||||||
|
|
@ -15530,8 +15528,7 @@ SDValue X86TargetLowering::LowerBRCOND(SDValue Op, SelectionDAG &DAG) const {
|
||||||
// We know the result of AND is compared against zero. Try to match
|
// We know the result of AND is compared against zero. Try to match
|
||||||
// it to BT.
|
// it to BT.
|
||||||
if (Cond.getOpcode() == ISD::AND && Cond.hasOneUse()) {
|
if (Cond.getOpcode() == ISD::AND && Cond.hasOneUse()) {
|
||||||
SDValue NewSetCC = LowerToBT(Cond, ISD::SETNE, dl, DAG);
|
if (SDValue NewSetCC = LowerToBT(Cond, ISD::SETNE, dl, DAG)) {
|
||||||
if (NewSetCC.getNode()) {
|
|
||||||
CC = NewSetCC.getOperand(0);
|
CC = NewSetCC.getOperand(0);
|
||||||
Cond = NewSetCC.getOperand(1);
|
Cond = NewSetCC.getOperand(1);
|
||||||
addTest = false;
|
addTest = false;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue