[PATCH] D104797: [WebAssembly] Implementation of global.get/set for reftypes in LLVM IR

Paulo Matos via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 2 07:33:58 PDT 2021


pmatos added a comment.

After @arsenm 's commit https://github.com/llvm/llvm-project/commit/990278d026d680942c859be70836ad34a9a716f7, MachineOperands store LLT for size instead of uint64_t and the constructor called from `SelectionDAG::getLoad`, calls `MachineMemOperand` which does:

  : MachineMemOperand(ptrinfo, f,
                      s == ~UINT64_C(0) ? LLT() : LLT::scalar(8 * s), a,
                      AAInfo, Ranges, SSID, Ordering, FailureOrdering) {}

Because `s` is zero for reference types, `LLT::scalar(0)` is called, which asserts because scalar LLTs cannot have zero size. Why do we have the check `s == ~UINT64_C(0)`, instead of `ss == UINT64_C(0)` given opaque types and therefore reference types are zero sized.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D104797/new/

https://reviews.llvm.org/D104797



More information about the llvm-commits mailing list