Skip to content

Commit 95dd62c

Browse files
committed
Address review comment
1 parent 553316f commit 95dd62c

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

llvm/lib/Target/RISCV/RISCVInstrInfo.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ Register RISCVInstrInfo::isLoadFromStackSlot(const MachineInstr &MI,
9999
return isLoadFromStackSlot(MI, FrameIndex, Dummy);
100100
}
101101

102-
static std::optional<unsigned> getNFForRVVWholeLoadStore(unsigned Opcode) {
102+
static std::optional<unsigned> getLMULForRVVWholeLoadStore(unsigned Opcode) {
103103
switch (Opcode) {
104104
default:
105105
return std::nullopt;
@@ -164,8 +164,8 @@ Register RISCVInstrInfo::isLoadFromStackSlot(const MachineInstr &MI,
164164
return Register();
165165
FrameIndex = MI.getOperand(1).getIndex();
166166
unsigned BytesPerBlock = RISCV::RVVBitsPerBlock / 8;
167-
unsigned NF = *getNFForRVVWholeLoadStore(MI.getOpcode());
168-
MemBytes = TypeSize::getScalable(BytesPerBlock * NF);
167+
unsigned LMUL = *getLMULForRVVWholeLoadStore(MI.getOpcode());
168+
MemBytes = TypeSize::getScalable(BytesPerBlock * LMUL);
169169
return MI.getOperand(0).getReg();
170170
}
171171

@@ -215,8 +215,8 @@ Register RISCVInstrInfo::isStoreToStackSlot(const MachineInstr &MI,
215215
return Register();
216216
FrameIndex = MI.getOperand(1).getIndex();
217217
unsigned BytesPerBlock = RISCV::RVVBitsPerBlock / 8;
218-
unsigned NF = *getNFForRVVWholeLoadStore(MI.getOpcode());
219-
MemBytes = TypeSize::getScalable(BytesPerBlock * NF);
218+
unsigned LMUL = *getLMULForRVVWholeLoadStore(MI.getOpcode());
219+
MemBytes = TypeSize::getScalable(BytesPerBlock * LMUL);
220220
return MI.getOperand(0).getReg();
221221
}
222222

@@ -4129,7 +4129,7 @@ bool RISCV::isRVVSpill(const MachineInstr &MI) {
41294129
// conservative.
41304130
unsigned Opcode = MI.getOpcode();
41314131
if (!RISCVVPseudosTable::getPseudoInfo(Opcode) &&
4132-
!getNFForRVVWholeLoadStore(Opcode) && !isRVVSpillForZvlsseg(Opcode))
4132+
!getLMULForRVVWholeLoadStore(Opcode) && !isRVVSpillForZvlsseg(Opcode))
41334133
return false;
41344134
return true;
41354135
}

0 commit comments

Comments
 (0)