Skip to content

Commit 6578642

Browse files
committed
fix the comments
1 parent f3b19c1 commit 6578642

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

llvm/lib/Target/RISCV/RISCVISelLowering.cpp

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18115,17 +18115,17 @@ bool RISCVTargetLowering::isDesirableToCommuteWithShift(
1811518115
// LD/ST, it can still complete the folding optimization operation performed
1811618116
// above.
1811718117
auto isLDST = [&]() {
18118-
bool canOptAwlays = false;
18118+
bool CanOptAlways = false;
1811918119
if (N0->getOpcode() == ISD::ADD && !N0->hasOneUse()) {
1812018120
for (SDNode *Use : N0->uses()) {
1812118121
// This use is the one we're on right now. Skip it
1812218122
if (Use == N || Use->getOpcode() == ISD::SELECT)
1812318123
continue;
1812418124
if (!isa<StoreSDNode>(Use) && !isa<LoadSDNode>(Use)) {
18125-
canOptAwlays = false;
18125+
CanOptAlways = false;
1812618126
break;
1812718127
}
18128-
canOptAwlays = true;
18128+
CanOptAlways = true;
1812918129
}
1813018130
}
1813118131

@@ -18136,20 +18136,20 @@ bool RISCVTargetLowering::isDesirableToCommuteWithShift(
1813618136
if (Use == N0.getNode() || Use->getOpcode() == ISD::SELECT)
1813718137
continue;
1813818138
if (!isa<StoreSDNode>(Use) && !isa<LoadSDNode>(Use)) {
18139-
canOptAwlays = false;
18139+
CanOptAlways = false;
1814018140
break;
1814118141
}
18142-
canOptAwlays = true;
18142+
CanOptAlways = true;
1814318143
}
1814418144
}
18145-
return canOptAwlays;
18145+
return CanOptAlways;
1814618146
};
1814718147

1814818148
if (Ty.isScalarInteger() &&
1814918149
(N0.getOpcode() == ISD::ADD || N0.getOpcode() == ISD::OR)) {
18150-
if (N0.getOpcode() == ISD::ADD && !N0->hasOneUse()) {
18150+
if (N0.getOpcode() == ISD::ADD && !N0->hasOneUse())
1815118151
return isLDST();
18152-
}
18152+
1815318153
auto *C1 = dyn_cast<ConstantSDNode>(N0->getOperand(1));
1815418154
auto *C2 = dyn_cast<ConstantSDNode>(N->getOperand(1));
1815518155
if (C1 && C2) {

0 commit comments

Comments
 (0)