[llvm] [CodeGen] Use LocationSize for MMO getSize (PR #84751)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Mon Mar 11 22:23:31 PDT 2024
================
@@ -1046,9 +1055,16 @@ class LLVM_EXTERNAL_VISIBILITY MachineFunction {
MachineMemOperand *getMachineMemOperand(const MachineMemOperand *MMO,
int64_t Offset, LLT Ty);
MachineMemOperand *getMachineMemOperand(const MachineMemOperand *MMO,
- int64_t Offset, uint64_t Size) {
+ int64_t Offset, LocationSize Size) {
return getMachineMemOperand(
- MMO, Offset, Size == ~UINT64_C(0) ? LLT() : LLT::scalar(8 * Size));
+ MMO, Offset,
+ !Size.hasValue() || Size.isScalable()
----------------
arsenm wrote:
Can this just assert Size.hasValue()? I would assume if you have the unknown case you would have been using the LLT constructor in the first place
https://github.com/llvm/llvm-project/pull/84751
More information about the llvm-commits
mailing list