Skip to content

Commit 586bf3c

Browse files
committed
reduce the paramters
1 parent 68422a2 commit 586bf3c

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

llvm/lib/Target/PowerPC/PPCISelLowering.cpp

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15570,13 +15570,15 @@ static bool canConvertToVcmpequb(SDValue &LHS, SDValue RHS) {
1557015570
}
1557115571

1557215572
SDValue convertTwoLoadsAndCmpToVCMPEQUB(SelectionDAG &DAG, SDNode *N,
15573-
const SDLoc &DL, SDValue &LHS,
15574-
SDValue RHS) {
15573+
const SDLoc &DL) {
15574+
15575+
assert(N->getOpcode() == ISD::SETCC && "Should be called with a SETCC node");
15576+
1557515577
ISD::CondCode CC = cast<CondCodeSDNode>(N->getOperand(2))->get();
1557615578
assert(CC == ISD::SETNE ||
1557715579
CC == ISD::SETEQ && "CC mus be ISD::SETNE or ISD::SETEQ");
15578-
auto *LA = dyn_cast<LoadSDNode>(LHS);
15579-
auto *LB = dyn_cast<LoadSDNode>(RHS);
15580+
auto *LA = dyn_cast<LoadSDNode>(N->getOperand(0));
15581+
auto *LB = dyn_cast<LoadSDNode>(N->getOperand(1));
1558015582

1558115583
// Following code transforms the DAG
1558215584
// t0: ch,glue = EntryToken
@@ -15660,7 +15662,7 @@ SDValue PPCTargetLowering::combineSetCC(SDNode *N,
1566015662
// and one vector compare instruction.
1566115663

1566215664
if (Subtarget.hasAltivec() && canConvertToVcmpequb(LHS, RHS))
15663-
return convertTwoLoadsAndCmpToVCMPEQUB(DCI.DAG, N, SDLoc(N), LHS, RHS);
15665+
return convertTwoLoadsAndCmpToVCMPEQUB(DCI.DAG, N, SDLoc(N));
1566415666
}
1566515667

1566615668
return DAGCombineTruncBoolExt(N, DCI);

0 commit comments

Comments
 (0)