diff options
Diffstat (limited to 'src/ir/abstract.h')
-rw-r--r-- | src/ir/abstract.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/ir/abstract.h b/src/ir/abstract.h index 1cd51b9ba..2bb764aeb 100644 --- a/src/ir/abstract.h +++ b/src/ir/abstract.h @@ -59,6 +59,13 @@ enum Op { GeU }; +inline bool hasAnyShift(BinaryOp op) { + return op == ShlInt32 || op == ShrSInt32 || op == ShrUInt32 || + op == RotLInt32 || op == RotRInt32 || op == ShlInt64 || + op == ShrSInt64 || op == ShrUInt64 || op == RotLInt64 || + op == RotRInt64; +} + // 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. |