summaryrefslogtreecommitdiff
path: root/src/ir/abstract.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/ir/abstract.h')
-rw-r--r--src/ir/abstract.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/ir/abstract.h b/src/ir/abstract.h
index e5dfd57e0..2308c47ba 100644
--- a/src/ir/abstract.h
+++ b/src/ir/abstract.h
@@ -67,6 +67,11 @@ inline bool hasAnyShift(BinaryOp op) {
op == RotRInt64;
}
+inline bool hasAnyReinterpret(UnaryOp op) {
+ return op == ReinterpretInt32 || op == ReinterpretInt64 ||
+ op == ReinterpretFloat32 || op == ReinterpretFloat64;
+}
+
// Provide a wasm type and an abstract op and get the concrete one. For example,
// you can provide i32 and Add and receive the specific opcode for a 32-bit
// addition, AddInt32. If the op does not exist, it returns Invalid.