Skip to content

Commit 83865a5

Browse files
committed
Capitalize variables
1 parent ac34287 commit 83865a5

File tree

1 file changed

+20
-20
lines changed

1 file changed

+20
-20
lines changed

llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -10983,28 +10983,28 @@ SDValue DAGCombiner::visitSRL(SDNode *N) {
1098310983
// -> (logic_op (srl x, c1), (zext y))
1098410984
// c1 <= leadingzeros(zext(y))
1098510985
if (N1C && ISD::isBitwiseLogicOp(N0.getOpcode()) && N0.hasOneUse()) {
10986-
SDValue lhs = N0.getOperand(0);
10987-
SDValue rhs = N0.getOperand(1);
10988-
SDValue shl;
10989-
SDValue other;
10990-
if (lhs.getOpcode() == ISD::SHL) {
10991-
shl = lhs;
10992-
other = rhs;
10993-
} else if (rhs.getOpcode() == ISD::SHL) {
10994-
shl = rhs;
10995-
other = lhs;
10996-
}
10997-
if (shl && shl.getOperand(1) == N1 && shl.hasOneUse()) {
10998-
SDValue zext = shl.getOperand(0);
10999-
if (zext.getOpcode() == ISD::ZERO_EXTEND) {
11000-
unsigned numLeadingZeros =
11001-
zext.getValueType().getScalarSizeInBits() -
11002-
zext.getOperand(0).getValueType().getScalarSizeInBits();
11003-
if (N1C->getZExtValue() <= numLeadingZeros) {
10986+
SDValue LHS = N0.getOperand(0);
10987+
SDValue RHS = N0.getOperand(1);
10988+
SDValue SHL;
10989+
SDValue Other;
10990+
if (LHS.getOpcode() == ISD::SHL) {
10991+
SHL = LHS;
10992+
Other = RHS;
10993+
} else if (RHS.getOpcode() == ISD::SHL) {
10994+
SHL = RHS;
10995+
Other = LHS;
10996+
}
10997+
if (SHL && SHL.getOperand(1) == N1 && SHL.hasOneUse()) {
10998+
SDValue ZExt = SHL.getOperand(0);
10999+
if (ZExt.getOpcode() == ISD::ZERO_EXTEND) {
11000+
unsigned NumLeadingZeros =
11001+
ZExt.getValueType().getScalarSizeInBits() -
11002+
ZExt.getOperand(0).getValueType().getScalarSizeInBits();
11003+
if (N1C->getZExtValue() <= NumLeadingZeros) {
1100411004
return DAG.getNode(
1100511005
N0.getOpcode(), SDLoc(N0), VT,
11006-
DAG.getNode(ISD::SRL, SDLoc(N0), VT, other, N1),
11007-
zext);
11006+
DAG.getNode(ISD::SRL, SDLoc(N0), VT, Other, N1),
11007+
ZExt);
1100811008
}
1100911009
}
1101011010
}

0 commit comments

Comments
 (0)