When printing a memory operand in MIR, this lined37bc32a65/llvm/lib/CodeGen/MachineOperand.cpp (L1247)calls thisd37bc32a65/llvm/include/llvm/Support/Alignment.h (L238)which assumes `Rhs` (the size in this case) is positive. But Wasm reference types' size is set to 0:d37bc32a65/llvm/include/llvm/CodeGen/ValueTypes.td (L326-L328)`getSize() > 0` condition was added with the Wasm reference types support in46667a1003, and it looks it was removed in #84751. This revives the condition so that Wasm reference types will not crash the MIR printer.
885 B
885 B