Skip to content

Commit 4581afb

Browse files
committed
fix the comments
1 parent d813414 commit 4581afb

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

llvm/lib/Target/RISCV/RISCVISelLowering.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18155,7 +18155,7 @@ bool RISCVTargetLowering::isDesirableToCommuteWithShift(
1815518155
// LD/ST will optimize constant Offset extraction, so when AddNode is used by
1815618156
// LD/ST, it can still complete the folding optimization operation performed
1815718157
// above.
18158-
auto isLDST = [&]() {
18158+
auto isUsedByLdSt = [&]() {
1815918159
bool CanOptAlways = false;
1816018160
if (N0->getOpcode() == ISD::ADD && !N0->hasOneUse()) {
1816118161
for (SDNode *Use : N0->uses()) {
@@ -18189,7 +18189,7 @@ bool RISCVTargetLowering::isDesirableToCommuteWithShift(
1818918189
if (Ty.isScalarInteger() &&
1819018190
(N0.getOpcode() == ISD::ADD || N0.getOpcode() == ISD::OR)) {
1819118191
if (N0.getOpcode() == ISD::ADD && !N0->hasOneUse())
18192-
return isLDST();
18192+
return isUsedByLdSt();
1819318193

1819418194
auto *C1 = dyn_cast<ConstantSDNode>(N0->getOperand(1));
1819518195
auto *C2 = dyn_cast<ConstantSDNode>(N->getOperand(1));
@@ -18232,7 +18232,7 @@ bool RISCVTargetLowering::isDesirableToCommuteWithShift(
1823218232
if (N0->getOpcode() == ISD::SIGN_EXTEND &&
1823318233
N0->getOperand(0)->getOpcode() == ISD::ADD &&
1823418234
!N0->getOperand(0)->hasOneUse())
18235-
return isLDST();
18235+
return isUsedByLdSt();
1823618236

1823718237
return true;
1823818238
}

0 commit comments

Comments
 (0)