Skip to content

Commit 9180b9f

Browse files
committed
[DAG] foldABSToABD - rename operand value types. NFC.
Match operand variable naming.
1 parent ebb8ffd commit 9180b9f

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10917,15 +10917,15 @@ SDValue DAGCombiner::foldABSToABD(SDNode *N) {
1091710917
return SDValue();
1091810918
}
1091910919

10920-
EVT VT1 = Op0.getOperand(0).getValueType();
10921-
EVT VT2 = Op1.getOperand(0).getValueType();
10920+
EVT VT0 = Op0.getOperand(0).getValueType();
10921+
EVT VT1 = Op1.getOperand(0).getValueType();
1092210922
unsigned ABDOpcode = (Opc0 == ISD::SIGN_EXTEND) ? ISD::ABDS : ISD::ABDU;
1092310923

1092410924
// fold abs(sext(x) - sext(y)) -> zext(abds(x, y))
1092510925
// fold abs(zext(x) - zext(y)) -> zext(abdu(x, y))
10926-
EVT MaxVT = VT1.bitsGT(VT2) ? VT1 : VT2;
10927-
if ((VT1 == MaxVT || Op0->hasOneUse()) &&
10928-
(VT2 == MaxVT || Op1->hasOneUse()) && hasOperation(ABDOpcode, MaxVT)) {
10926+
EVT MaxVT = VT0.bitsGT(VT1) ? VT0 : VT1;
10927+
if ((VT0 == MaxVT || Op0->hasOneUse()) &&
10928+
(VT1 == MaxVT || Op1->hasOneUse()) && hasOperation(ABDOpcode, MaxVT)) {
1092910929
SDValue ABD = DAG.getNode(ABDOpcode, DL, MaxVT,
1093010930
DAG.getNode(ISD::TRUNCATE, DL, MaxVT, Op0),
1093110931
DAG.getNode(ISD::TRUNCATE, DL, MaxVT, Op1));

0 commit comments

Comments
 (0)