aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/MachineOperand.cpp
diff options
context:
space:
mode:
authorPaulo Matos <pmatos@igalia.com>2021-06-10 10:02:10 +0200
committerPaulo Matos <pmatos@igalia.com>2021-07-02 09:46:28 +0200
commit4facbf213c51e4add2e8c19b08d5e58ad71c72de (patch)
tree3839ef3d80cdf776b0c168506aff893ed1a94aa4 /llvm/lib/CodeGen/MachineOperand.cpp
parent6944f7da25517cc554bf7fd11205082e2c976a97 (diff)
downloadllvm-4facbf213c51e4add2e8c19b08d5e58ad71c72de.zip
llvm-4facbf213c51e4add2e8c19b08d5e58ad71c72de.tar.gz
llvm-4facbf213c51e4add2e8c19b08d5e58ad71c72de.tar.bz2
[WebAssembly] Implementation of global.get/set for reftypes in LLVM IR
Reland of 31859f896. This change implements new DAG notes GLOBAL_GET/GLOBAL_SET, and lowering methods for load and stores of reference types from IR globals. Once the lowering creates the new nodes, tablegen pattern matches those and converts them to Wasm global.get/set. Differential Revision: https://reviews.llvm.org/D104797
Diffstat (limited to 'llvm/lib/CodeGen/MachineOperand.cpp')
-rw-r--r--llvm/lib/CodeGen/MachineOperand.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/MachineOperand.cpp b/llvm/lib/CodeGen/MachineOperand.cpp
index db973bd..b8ba045 100644
--- a/llvm/lib/CodeGen/MachineOperand.cpp
+++ b/llvm/lib/CodeGen/MachineOperand.cpp
@@ -1180,7 +1180,7 @@ void MachineMemOperand::print(raw_ostream &OS, ModuleSlotTracker &MST,
<< "unknown-address";
}
MachineOperand::printOperandOffset(OS, getOffset());
- if (getAlign() != getSize())
+ if (getSize() > 0 && getAlign() != getSize())
OS << ", align " << getAlign().value();
if (getAlign() != getBaseAlign())
OS << ", basealign " << getBaseAlign().value();