Skip to content

Commit 6e84fd2

Browse files
oscardssmithOscar Smith
authored andcommitted
format
1 parent 3f2ad41 commit 6e84fd2

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5482,17 +5482,18 @@ void DAGTypeLegalizer::ExpandIntRes_FunnelShift(SDNode *N, SDValue &Lo,
54825482
}
54835483

54845484
void DAGTypeLegalizer::ExpandIntRes_CLMUL(SDNode *N, SDValue &Lo,
5485-
SDValue &Hi) {
5485+
SDValue &Hi) {
54865486
// Values numbered from least significant to most significant.
54875487
SDValue LL, LH, RL, RH;
54885488
GetExpandedInteger(N->getOperand(0), LL, LH);
54895489
GetExpandedInteger(N->getOperand(1), RL, RH);
54905490
EVT HalfVT = LL.getValueType();
54915491
SDLoc DL(N);
54925492

5493-
// CLMUL is carryless so Lo is computed from the low half
5493+
// Lo is computed from the low half
54945494
Lo = DAG.getNode(ISD::CLMUL, DL, HalfVT, LL, RL);
5495-
// the high bits not included in CLMUL(A,B) can be computed by
5495+
// CLMUL is carryless so the high bits not included in CLMUL(A,B)
5496+
// can be computed by
54965497
// BITREVERSE(CLMUL(BITREVERSE(A), BITREVERSE(B))) >> 1
54975498
// Therefore we can compute the 2 hi/lo cross products
54985499
// and the the overflow of the low product
@@ -5505,10 +5506,10 @@ void DAGTypeLegalizer::ExpandIntRes_CLMUL(SDNode *N, SDValue &Lo,
55055506
SDValue One = DAG.getShiftAmountConstant(1, HalfVT, DL);
55065507
Hi = DAG.getNode(ISD::SRL, DL, HalfVT, LoHi, One);
55075508

5508-
SDValue HITMP = DAG.getNode(ISD::CLMUL, DL, HalfVT, LL, RH);
5509-
Hi = DAG.getNode(ISD::XOR, DL, HalfVT, Hi, HITMP);
5510-
HITMP = DAG.getNode(ISD::CLMUL, DL, HalfVT, LH, RL);
5511-
Hi = DAG.getNode(ISD::XOR, DL, HalfVT, Hi, HITMP);
5509+
SDValue HiTmp = DAG.getNode(ISD::CLMUL, DL, HalfVT, LL, RH);
5510+
Hi = DAG.getNode(ISD::XOR, DL, HalfVT, Hi, HiTmp);
5511+
HiTmp = DAG.getNode(ISD::CLMUL, DL, HalfVT, LH, RL);
5512+
Hi = DAG.getNode(ISD::XOR, DL, HalfVT, Hi, HiTmp);
55125513
}
55135514

55145515
void DAGTypeLegalizer::ExpandIntRes_VSCALE(SDNode *N, SDValue &Lo,

0 commit comments

Comments
 (0)