Skip to content

Commit bb60a99

Browse files
committed
Rebase
Created using spr 1.3.6-beta.1
2 parents 9e80e35 + 61b0078 commit bb60a99

File tree

2 files changed

+8
-9
lines changed

2 files changed

+8
-9
lines changed

llvm/lib/Target/RISCV/RISCVISelLowering.cpp

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16215,12 +16215,14 @@ static SDValue performSETCCCombine(SDNode *N, SelectionDAG &DAG,
1621516215
EVT VT = N->getValueType(0);
1621616216
EVT OpVT = N0.getValueType();
1621716217

16218-
// Looking for an equality compare.
1621916218
ISD::CondCode Cond = cast<CondCodeSDNode>(N->getOperand(2))->get();
16220-
if (ISD::isIntEqualitySetCC(Cond))
16221-
if (SDValue V = combineVectorSizedSetCCEquality(VT, N0, N1, Cond, dl, DAG,
16222-
Subtarget))
16223-
return V;
16219+
// Looking for an equality compare.
16220+
if (!isIntEqualitySetCC(Cond))
16221+
return SDValue();
16222+
16223+
if (SDValue V =
16224+
combineVectorSizedSetCCEquality(VT, N0, N1, Cond, dl, DAG, Subtarget))
16225+
return V;
1622416226

1622516227
if (OpVT != MVT::i64 || !Subtarget.is64Bit())
1622616228
return SDValue();
@@ -16236,9 +16238,6 @@ static SDValue performSETCCCombine(SDNode *N, SelectionDAG &DAG,
1623616238
N0.getConstantOperandVal(1) != UINT64_C(0xffffffff))
1623716239
return SDValue();
1623816240

16239-
if (!isIntEqualitySetCC(Cond))
16240-
return SDValue();
16241-
1624216241
// Don't do this if the sign bit is provably zero, it will be turned back into
1624316242
// an AND.
1624416243
APInt SignMask = APInt::getOneBitSet(64, 31);

llvm/lib/Target/RISCV/RISCVTargetTransformInfo.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2953,7 +2953,7 @@ RISCVTTIImpl::enableMemCmpExpansion(bool OptSize, bool IsZeroCmp) const {
29532953
Options.AllowedTailExpansions = {3};
29542954
}
29552955

2956-
if (IsZeroCmp && ST->hasVInstructions() && ST->enableUnalignedVectorMem()) {
2956+
if (IsZeroCmp && ST->hasVInstructions()) {
29572957
unsigned VLenB = ST->getRealMinVLen() / 8;
29582958
// The minimum size should be the maximum bytes between `VLen * LMUL_MF8`
29592959
// and `XLen * 2`.

0 commit comments

Comments
 (0)