@@ -1614,7 +1614,8 @@ static void changeVectorFPCCToAArch64CC(ISD::CondCode CC,
1614
1614
// All of the compare-mask comparisons are ordered, but we can switch
1615
1615
// between the two by a double inversion. E.g. ULE == !OGT.
1616
1616
Invert = true;
1617
- changeFPCCToAArch64CC(getSetCCInverse(CC, false), CondCode, CondCode2);
1617
+ changeFPCCToAArch64CC(getSetCCInverse(CC, /* FP inverse */ MVT::f32),
1618
+ CondCode, CondCode2);
1618
1619
break;
1619
1620
}
1620
1621
}
@@ -1861,7 +1862,7 @@ static SDValue emitConjunctionRec(SelectionDAG &DAG, SDValue Val,
1861
1862
ISD::CondCode CC = cast<CondCodeSDNode>(Val->getOperand(2))->get();
1862
1863
bool isInteger = LHS.getValueType().isInteger();
1863
1864
if (Negate)
1864
- CC = getSetCCInverse(CC, isInteger );
1865
+ CC = getSetCCInverse(CC, LHS.getValueType() );
1865
1866
SDLoc DL(Val);
1866
1867
// Determine OutCC and handle FP special case.
1867
1868
if (isInteger) {
@@ -2333,7 +2334,7 @@ static SDValue LowerXOR(SDValue Op, SelectionDAG &DAG) {
2333
2334
if (CTVal->isAllOnesValue() && CFVal->isNullValue()) {
2334
2335
std::swap(TVal, FVal);
2335
2336
std::swap(CTVal, CFVal);
2336
- CC = ISD::getSetCCInverse(CC, true );
2337
+ CC = ISD::getSetCCInverse(CC, LHS.getValueType() );
2337
2338
}
2338
2339
2339
2340
// If the constants line up, perform the transform!
@@ -5026,8 +5027,8 @@ SDValue AArch64TargetLowering::LowerSETCC(SDValue Op, SelectionDAG &DAG) const {
5026
5027
5027
5028
if (LHS.getValueType().isInteger()) {
5028
5029
SDValue CCVal;
5029
- SDValue Cmp =
5030
- getAArch64Cmp( LHS, RHS, ISD::getSetCCInverse(CC, true ), CCVal, DAG, dl);
5030
+ SDValue Cmp = getAArch64Cmp(
5031
+ LHS, RHS, ISD::getSetCCInverse(CC, LHS.getValueType() ), CCVal, DAG, dl);
5031
5032
5032
5033
// Note that we inverted the condition above, so we reverse the order of
5033
5034
// the true and false operands here. This will allow the setcc to be
@@ -5046,7 +5047,8 @@ SDValue AArch64TargetLowering::LowerSETCC(SDValue Op, SelectionDAG &DAG) const {
5046
5047
AArch64CC::CondCode CC1, CC2;
5047
5048
changeFPCCToAArch64CC(CC, CC1, CC2);
5048
5049
if (CC2 == AArch64CC::AL) {
5049
- changeFPCCToAArch64CC(ISD::getSetCCInverse(CC, false), CC1, CC2);
5050
+ changeFPCCToAArch64CC(ISD::getSetCCInverse(CC, LHS.getValueType()), CC1,
5051
+ CC2);
5050
5052
SDValue CC1Val = DAG.getConstant(CC1, dl, MVT::i32);
5051
5053
5052
5054
// Note that we inverted the condition above, so we reverse the order of
@@ -5107,26 +5109,26 @@ SDValue AArch64TargetLowering::LowerSELECT_CC(ISD::CondCode CC, SDValue LHS,
5107
5109
if (CTVal && CFVal && CTVal->isAllOnesValue() && CFVal->isNullValue()) {
5108
5110
std::swap(TVal, FVal);
5109
5111
std::swap(CTVal, CFVal);
5110
- CC = ISD::getSetCCInverse(CC, true );
5112
+ CC = ISD::getSetCCInverse(CC, LHS.getValueType() );
5111
5113
} else if (CTVal && CFVal && CTVal->isOne() && CFVal->isNullValue()) {
5112
5114
std::swap(TVal, FVal);
5113
5115
std::swap(CTVal, CFVal);
5114
- CC = ISD::getSetCCInverse(CC, true );
5116
+ CC = ISD::getSetCCInverse(CC, LHS.getValueType() );
5115
5117
} else if (TVal.getOpcode() == ISD::XOR) {
5116
5118
// If TVal is a NOT we want to swap TVal and FVal so that we can match
5117
5119
// with a CSINV rather than a CSEL.
5118
5120
if (isAllOnesConstant(TVal.getOperand(1))) {
5119
5121
std::swap(TVal, FVal);
5120
5122
std::swap(CTVal, CFVal);
5121
- CC = ISD::getSetCCInverse(CC, true );
5123
+ CC = ISD::getSetCCInverse(CC, LHS.getValueType() );
5122
5124
}
5123
5125
} else if (TVal.getOpcode() == ISD::SUB) {
5124
5126
// If TVal is a negation (SUB from 0) we want to swap TVal and FVal so
5125
5127
// that we can match with a CSNEG rather than a CSEL.
5126
5128
if (isNullConstant(TVal.getOperand(0))) {
5127
5129
std::swap(TVal, FVal);
5128
5130
std::swap(CTVal, CFVal);
5129
- CC = ISD::getSetCCInverse(CC, true );
5131
+ CC = ISD::getSetCCInverse(CC, LHS.getValueType() );
5130
5132
}
5131
5133
} else if (CTVal && CFVal) {
5132
5134
const int64_t TrueVal = CTVal->getSExtValue();
@@ -5169,7 +5171,7 @@ SDValue AArch64TargetLowering::LowerSELECT_CC(ISD::CondCode CC, SDValue LHS,
5169
5171
if (Swap) {
5170
5172
std::swap(TVal, FVal);
5171
5173
std::swap(CTVal, CFVal);
5172
- CC = ISD::getSetCCInverse(CC, true );
5174
+ CC = ISD::getSetCCInverse(CC, LHS.getValueType() );
5173
5175
}
5174
5176
5175
5177
if (Opcode != AArch64ISD::CSEL) {
@@ -10430,10 +10432,10 @@ static SDValue performSetccAddFolding(SDNode *Op, SelectionDAG &DAG) {
10430
10432
MVT::i32);
10431
10433
Cmp = *InfoAndKind.Info.AArch64.Cmp;
10432
10434
} else
10433
- Cmp = getAArch64Cmp(*InfoAndKind.Info.Generic.Opnd0,
10434
- *InfoAndKind.Info.Generic.Opnd1,
10435
- ISD::getSetCCInverse(InfoAndKind.Info.Generic.CC, true) ,
10436
- CCVal, DAG, dl);
10435
+ Cmp = getAArch64Cmp(
10436
+ *InfoAndKind.Info.Generic.Opnd0, *InfoAndKind.Info.Generic.Opnd1,
10437
+ ISD::getSetCCInverse(InfoAndKind.Info.Generic.CC, CmpVT), CCVal, DAG ,
10438
+ dl);
10437
10439
10438
10440
EVT VT = Op->getValueType(0);
10439
10441
LHS = DAG.getNode(ISD::ADD, dl, VT, RHS, DAG.getConstant(1, dl, VT));
0 commit comments