Beaver.MLIR.Dialect.WasmSSA (beaver v0.4.7)
Summary
Functions
wasmssa.abs - Floating point absolute value
wasmssa.add - Sum two values
wasmssa.and - Compute the bitwise AND between two values
wasmssa.block - Create a nesting level
wasmssa.block_return - Return from the current block
wasmssa.branch_if - Jump to target level if condition has non-zero value
wasmssa.call - Calling a Wasm function
wasmssa.ceil - Ceil rounding of floating point value
wasmssa.clz - Count leading zeroes of an integer
wasmssa.const
wasmssa.convert_s - Convert integer interpreted as 2's complement signed value to floating-point value.
wasmssa.convert_u - Convert integer, interpreted as binary encoded positive value, to floating-point value.
wasmssa.copysign - Copy sign from one floating point value to the other.
wasmssa.ctz - Count trailing zeroes of an integer
wasmssa.demote - Convert a f64 value to f32
wasmssa.div - Division between floating point values
wasmssa.div_si - Divide values interpreted as signed int
wasmssa.div_ui - Divide values interpreted as unsigned int
wasmssa.eq - Check if two values are equal
wasmssa.eqz - Check if the given value is equal to zero
wasmssa.extend
wasmssa.extend_i32_s - Sign extend i32 to i64.
wasmssa.extend_i32_u - Zero extend i32 to i64.
wasmssa.floor - Floor rounding of floating point value
wasmssa.func
wasmssa.ge - Check if a float value is greater or equal to another
wasmssa.ge_si - Check if a signed integer value is greater or equal to another
wasmssa.ge_ui - Check if an unsigned integer value is greater or equal to another
wasmssa.global
wasmssa.global_get
wasmssa.gt - Check if a float value is greater than another
wasmssa.gt_si - Check if a signed integer value is greater than another
wasmssa.gt_ui - Check if an unsigned integer value is greater than another
wasmssa.if - Execute the if region if condition value is non-zero, the else region otherwise.
wasmssa.import_func
wasmssa.import_global
wasmssa.import_mem
wasmssa.import_table
wasmssa.le - Check if a float value is less or equal to another
wasmssa.le_si - Check if a signed integer value is less or equal to another
wasmssa.le_ui - Check if an unsigned integer value is less or equal to another
wasmssa.local
wasmssa.local_get - Set local to value and return the operand.
wasmssa.local_set - Set local to given value
wasmssa.local_tee - Set local to value and return the operand.
wasmssa.loop - Create a nesting level similar to Block Op, except that it has itself as a successor.
wasmssa.lt - Check if a float value is less than another
wasmssa.lt_si - Check if a signed integer value is less than another
wasmssa.lt_ui - Check if an unsigned integer value is less than another
wasmssa.max - Compute the minimum of two floating point values.
wasmssa.memory
wasmssa.min - Compute the minimum of two floating point values.
wasmssa.mul - Multiply two values
wasmssa.ne - Check if two values are different
wasmssa.neg - Floating point negation
wasmssa.or - Compute the bitwise OR of two values
wasmssa.popcnt - Population count of an integer.
wasmssa.promote - Get f64 representation of a f32 value.
wasmssa.reinterpret - Reinterpret the value represented by a bit vector by
wasmssa.rem_si - Calculate the remainder of dividing two integer values as signed integer
wasmssa.rem_ui - Calculate the remainder of dividing two integer values as an unsigned integer
wasmssa.return - Return from the current function frame
wasmssa.rotl - Rotate left.
wasmssa.rotr - Rotate right.
wasmssa.shl - Consume an integer and an integer shift amount. The first
wasmssa.shr_s - Arithmetic right shift.
wasmssa.shr_u - Logical right shift.
wasmssa.sqrt - Floating point square root
wasmssa.sub - Subtract two values
wasmssa.table
wasmssa.trunc - Trunc of floating point value
wasmssa.wrap - Cast an i64 to i32 by using a wrapping mechanism: y = x mod 2^32
wasmssa.xor - Compute the bitwise XOR of two values
Functions
wasmssa.abs - Floating point absolute value
This op has support for result type inference.
Operands
src- Single, anonymous/composite constraint, 32-bit float or 64-bit float
Results
result- Single, anonymous/composite constraint, 32-bit float or 64-bit float
Description
Example:
```mlir
%a = wasmssa.abs %b : f32
```
wasmssa.add - Sum two values
This op has support for result type inference.
Operands
lhs- Single, anonymous/composite constraint, 32-bit signless integer or 64-bit signless integer or 32-bit float or 64-bit floatrhs- Single, anonymous/composite constraint, 32-bit signless integer or 64-bit signless integer or 32-bit float or 64-bit float
Results
result- Single, anonymous/composite constraint, 32-bit signless integer or 64-bit signless integer or 32-bit float or 64-bit float
Description
Example:
```mlir
%a = wasmssa.add %b %c : i32
```
wasmssa.and - Compute the bitwise AND between two values
This op has support for result type inference.
Operands
lhs- Single, anonymous/composite constraint, 32-bit signless integer or 64-bit signless integer or 32-bit float or 64-bit floatrhs- Single, anonymous/composite constraint, 32-bit signless integer or 64-bit signless integer or 32-bit float or 64-bit float
Results
result- Single, anonymous/composite constraint, 32-bit signless integer or 64-bit signless integer or 32-bit float or 64-bit float
Description
Example:
```mlir
%a = wasmssa.and %b %c : i32
```
wasmssa.block - Create a nesting level
Operands
inputs- Variadic,WasmSSA_ValType, variadic of 32-bit signless integer or 64-bit signless integer or 32-bit float or 64-bit float or 128-bit signless integer or Opaque type for function reference or Opaque type for external reference
wasmssa.block_return - Return from the current block
Operands
inputs- Variadic,WasmSSA_ValType, variadic of 32-bit signless integer or 64-bit signless integer or 32-bit float or 64-bit float or 128-bit signless integer or Opaque type for function reference or Opaque type for external reference
Description
Marks a return from the current block.
Example:
wasmssa.block_return
wasmssa.branch_if - Jump to target level if condition has non-zero value
Attributes
exitLevel- Single,UI32Attr, 32-bit unsigned integer attribute
Operands
condition- Single,I32, 32-bit signless integerinputs- Variadic,WasmSSA_ValType, variadic of 32-bit signless integer or 64-bit signless integer or 32-bit float or 64-bit float or 128-bit signless integer or Opaque type for function reference or Opaque type for external reference
Description
Jump to target level if the condition is has a non-zero value.
Example:
wasmssa.branch_if %a to level 0 with args(%b : i32) else ^bb1
wasmssa.call - Calling a Wasm function
Attributes
callee- Single,FlatSymbolRefAttr, flat symbol reference attribute
Operands
operands- Variadic,WasmSSA_ValType, variadic of 32-bit signless integer or 64-bit signless integer or 32-bit float or 64-bit float or 128-bit signless integer or Opaque type for function reference or Opaque type for external reference
Results
results- Variadic,WasmSSA_ValType, variadic of 32-bit signless integer or 64-bit signless integer or 32-bit float or 64-bit float or 128-bit signless integer or Opaque type for function reference or Opaque type for external reference
Description
Emits a call to a defined function
Example:
%a = wasmssa.call @func_0 : () -> i32
wasmssa.ceil - Ceil rounding of floating point value
This op has support for result type inference.
Operands
src- Single, anonymous/composite constraint, 32-bit float or 64-bit float
Results
result- Single, anonymous/composite constraint, 32-bit float or 64-bit float
Description
Example:
```mlir
%a = wasmssa.ceil %b : f32
```
wasmssa.clz - Count leading zeroes of an integer
This op has support for result type inference.
Operands
src- Single, anonymous/composite constraint, 32-bit signless integer or 64-bit signless integer
Results
result- Single, anonymous/composite constraint, 32-bit signless integer or 64-bit signless integer
Description
Example:
```mlir
%a = wasmssa.clz %b : i32
```
wasmssa.const
wasmssa.convert_s - Convert integer interpreted as 2's complement signed value to floating-point value.
Consume an integer and produces a floating point value containing the rounded value of the original operand. Rounding is round to nearest, tie to even.Operands
input- Single, anonymous/composite constraint, 32-bit signless integer or 64-bit signless integer
Results
result- Single, anonymous/composite constraint, 32-bit float or 64-bit float
Description
Example:
```mlir
%a = wasmssa.convert_s %b : i32 to f64
```
wasmssa.convert_u - Convert integer, interpreted as binary encoded positive value, to floating-point value.
Consume an integer and produces a floating point value containing the rounded value of the original operand. Rounding is round to nearest, tie to even.Operands
input- Single, anonymous/composite constraint, 32-bit signless integer or 64-bit signless integer
Results
result- Single, anonymous/composite constraint, 32-bit float or 64-bit float
Description
Example:
```mlir
%a = wasmssa.convert_u %b : i32 to f64
```
wasmssa.copysign - Copy sign from one floating point value to the other.
This op has support for result type inference.
Operands
lhs- Single, anonymous/composite constraint, 32-bit float or 64-bit floatrhs- Single, anonymous/composite constraint, 32-bit float or 64-bit float
Results
result- Single, anonymous/composite constraint, 32-bit float or 64-bit float
Description
Example:
```mlir
%a = wasmssa.copysign %b %c : f32
```
wasmssa.ctz - Count trailing zeroes of an integer
This op has support for result type inference.
Operands
src- Single, anonymous/composite constraint, 32-bit signless integer or 64-bit signless integer
Results
result- Single, anonymous/composite constraint, 32-bit signless integer or 64-bit signless integer
Description
Example:
```mlir
%a = wasmssa.ctz %b : i32
```
wasmssa.demote - Convert a f64 value to f32
Operands
input- Single, anonymous/composite constraint, 64-bit float
Results
result- Single, anonymous/composite constraint, 32-bit float
Description
Example:
```mlir
%a = wasmssa.demote %b : f64 to f32
```
wasmssa.div - Division between floating point values
This op has support for result type inference.
Operands
lhs- Single, anonymous/composite constraint, 32-bit float or 64-bit floatrhs- Single, anonymous/composite constraint, 32-bit float or 64-bit float
Results
result- Single, anonymous/composite constraint, 32-bit float or 64-bit float
Description
Example:
```mlir
%a = wasmssa.div %b %c : f32
```
wasmssa.div_si - Divide values interpreted as signed int
This op has support for result type inference.
Operands
lhs- Single, anonymous/composite constraint, 32-bit signless integer or 64-bit signless integerrhs- Single, anonymous/composite constraint, 32-bit signless integer or 64-bit signless integer
Results
result- Single, anonymous/composite constraint, 32-bit signless integer or 64-bit signless integer
Description
Example:
```mlir
%a = wasmssa.div_si %b %c : i32
```
wasmssa.div_ui - Divide values interpreted as unsigned int
This op has support for result type inference.
Operands
lhs- Single, anonymous/composite constraint, 32-bit signless integer or 64-bit signless integerrhs- Single, anonymous/composite constraint, 32-bit signless integer or 64-bit signless integer
Results
result- Single, anonymous/composite constraint, 32-bit signless integer or 64-bit signless integer
Description
Example:
```mlir
%a = wasmssa.div_ui %b %c : i32
```
wasmssa.eq - Check if two values are equal
This op has support for result type inference.
Operands
lhs- Single, anonymous/composite constraint, 32-bit signless integer or 64-bit signless integer or 32-bit float or 64-bit floatrhs- Single, anonymous/composite constraint, 32-bit signless integer or 64-bit signless integer or 32-bit float or 64-bit float
Results
result- Single,I32, 32-bit signless integer
Description
Example:
```mlir
%a = wasmssa.eq %b %c : i32
```
wasmssa.eqz - Check if the given value is equal to zero
This op has support for result type inference.
Operands
input- Single,WasmSSA_IntegerType, 32-bit signless integer or 64-bit signless integer
Results
result- Single,I32, 32-bit signless integer
Description
Example:
```mlir
%a = wasmssa.eqz %b : i64 -> i32
```
wasmssa.extend
This op has support for result type inference.
Attributes
bitsToTake- Single,Builtin_IntegerAttr, An Attribute containing a integer value
Operands
input- Single,WasmSSA_IntegerType, 32-bit signless integer or 64-bit signless integer
Results
result- Single,WasmSSA_IntegerType, 32-bit signless integer or 64-bit signless integer
Description
Extend low bytes of a value to fit a given width. For instance, signed extension from 8 low bits of the 32-bits integer value 254 (0x000000FE) would produce the value -2 (0xFFFFFFFE).
This corresponds to the extendnn instruction of Wasm, which shouldn't be
confused with the extend_inn Wasm instruction, for which all input bits
are used and widened to wider output type.
In this operation, input and output types are the same.
Example:
%a = wasmssa.extend 16 low bits from %[[VAL_0]]: i64
wasmssa.extend_i32_s - Sign extend i32 to i64.
This op has support for result type inference.
Operands
input- Single,I32, 32-bit signless integer
Results
result- Single,I64, 64-bit signless integer
Description
Example:
```mlir
%a = wasmssa.extend_i32_s %b to i64
```
wasmssa.extend_i32_u - Zero extend i32 to i64.
This op has support for result type inference.
Operands
input- Single,I32, 32-bit signless integer
Results
result- Single,I64, 64-bit signless integer
Description
Example:
```mlir
%a = wasmssa.extend_i32_s %b to i64
```
wasmssa.floor - Floor rounding of floating point value
This op has support for result type inference.
Operands
src- Single, anonymous/composite constraint, 32-bit float or 64-bit float
Results
result- Single, anonymous/composite constraint, 32-bit float or 64-bit float
Description
Example:
```mlir
%a = wasmssa.floor %b : f32
```
wasmssa.func
wasmssa.ge - Check if a float value is greater or equal to another
This op has support for result type inference.
Operands
lhs- Single, anonymous/composite constraint, 32-bit float or 64-bit floatrhs- Single, anonymous/composite constraint, 32-bit float or 64-bit float
Results
result- Single,I32, 32-bit signless integer
Description
Example:
```mlir
%a = wasmssa.ge %b %c : i32
```
wasmssa.ge_si - Check if a signed integer value is greater or equal to another
This op has support for result type inference.
Operands
lhs- Single, anonymous/composite constraint, 32-bit signless integer or 64-bit signless integerrhs- Single, anonymous/composite constraint, 32-bit signless integer or 64-bit signless integer
Results
result- Single,I32, 32-bit signless integer
Description
Example:
```mlir
%a = wasmssa.ge_si %b %c : i32
```
wasmssa.ge_ui - Check if an unsigned integer value is greater or equal to another
This op has support for result type inference.
Operands
lhs- Single, anonymous/composite constraint, 32-bit signless integer or 64-bit signless integerrhs- Single, anonymous/composite constraint, 32-bit signless integer or 64-bit signless integer
Results
result- Single,I32, 32-bit signless integer
Description
Example:
```mlir
%a = wasmssa.ge_ui %b %c : i32
```
wasmssa.global
wasmssa.global_get
wasmssa.gt - Check if a float value is greater than another
This op has support for result type inference.
Operands
lhs- Single, anonymous/composite constraint, 32-bit float or 64-bit floatrhs- Single, anonymous/composite constraint, 32-bit float or 64-bit float
Results
result- Single,I32, 32-bit signless integer
Description
Example:
```mlir
%a = wasmssa.gt %b %c : i32
```
wasmssa.gt_si - Check if a signed integer value is greater than another
This op has support for result type inference.
Operands
lhs- Single, anonymous/composite constraint, 32-bit signless integer or 64-bit signless integerrhs- Single, anonymous/composite constraint, 32-bit signless integer or 64-bit signless integer
Results
result- Single,I32, 32-bit signless integer
Description
Example:
```mlir
%a = wasmssa.gt_si %b %c : i32
```
wasmssa.gt_ui - Check if an unsigned integer value is greater than another
This op has support for result type inference.
Operands
lhs- Single, anonymous/composite constraint, 32-bit signless integer or 64-bit signless integerrhs- Single, anonymous/composite constraint, 32-bit signless integer or 64-bit signless integer
Results
result- Single,I32, 32-bit signless integer
Description
Example:
```mlir
%a = wasmssa.gt_ui %b %c : i32
```
wasmssa.if - Execute the if region if condition value is non-zero, the else region otherwise.
Operands
condition- Single,I32, 32-bit signless integerinputs- Variadic,WasmSSA_ValType, variadic of 32-bit signless integer or 64-bit signless integer or 32-bit float or 64-bit float or 128-bit signless integer or Opaque type for function reference or Opaque type for external reference
Description
Execute the if region if the condition is non-zero. Otherwise the else region is executed. The else region can be empty but must return the same datatype as the if region. If clauses can be nested.
Example:
// Runs the if clause is %a is non-zero
wasmssa.if %a {
// Execute if %a is non-zero
} else {
// else clause
}
wasmssa.import_func
wasmssa.import_global
wasmssa.import_mem
wasmssa.import_table
wasmssa.le - Check if a float value is less or equal to another
This op has support for result type inference.
Operands
lhs- Single, anonymous/composite constraint, 32-bit float or 64-bit floatrhs- Single, anonymous/composite constraint, 32-bit float or 64-bit float
Results
result- Single,I32, 32-bit signless integer
Description
Example:
```mlir
%a = wasmssa.le %b %c : i32
```
wasmssa.le_si - Check if a signed integer value is less or equal to another
This op has support for result type inference.
Operands
lhs- Single, anonymous/composite constraint, 32-bit signless integer or 64-bit signless integerrhs- Single, anonymous/composite constraint, 32-bit signless integer or 64-bit signless integer
Results
result- Single,I32, 32-bit signless integer
Description
Example:
```mlir
%a = wasmssa.le_si %b %c : i32
```
wasmssa.le_ui - Check if an unsigned integer value is less or equal to another
This op has support for result type inference.
Operands
lhs- Single, anonymous/composite constraint, 32-bit signless integer or 64-bit signless integerrhs- Single, anonymous/composite constraint, 32-bit signless integer or 64-bit signless integer
Results
result- Single,I32, 32-bit signless integer
Description
Example:
```mlir
%a = wasmssa.le_ui %b %c : i32
```
wasmssa.local
wasmssa.local_get - Set local to value and return the operand.
This op has support for result type inference.
Operands
localVar- Single,WasmSSA_LocalRef, Type of a local variable
Results
result- Single,WasmSSA_ValType, 32-bit signless integer or 64-bit signless integer or 32-bit float or 64-bit float or 128-bit signless integer or Opaque type for function reference or Opaque type for external reference
Description
Gets the value of a local variable and returns a reference to it.
Example:
// Retrieves a reference to `%a`, a float32 local
%b = wasmssa.local_get %a : ref to f32
wasmssa.local_set - Set local to given value
Operands
localVar- Single,WasmSSA_LocalRef, Type of a local variablevalue- Single,WasmSSA_ValType, 32-bit signless integer or 64-bit signless integer or 32-bit float or 64-bit float or 128-bit signless integer or Opaque type for function reference or Opaque type for external reference
Description
Sets the value of a local variable.
Example:
// Sets `%d`, to the value of `%c`
wasmssa.local_set %d : ref to i32 to %c : i32
wasmssa.local_tee - Set local to value and return the operand.
This op has support for result type inference.
Operands
localVar- Single,WasmSSA_LocalRef, Type of a local variablevalue- Single,WasmSSA_ValType, 32-bit signless integer or 64-bit signless integer or 32-bit float or 64-bit float or 128-bit signless integer or Opaque type for function reference or Opaque type for external reference
Results
result- Single,WasmSSA_ValType, 32-bit signless integer or 64-bit signless integer or 32-bit float or 64-bit float or 128-bit signless integer or Opaque type for function reference or Opaque type for external reference
Description
Sets the value of a local variable and returns it.
Example:
// Sets `%b`, to the value of `%c` and returns it in %a
%a = wasmssa.local_tee %b : ref to i32 to %c : i32
wasmssa.loop - Create a nesting level similar to Block Op, except that it has itself as a successor.
Operands
inputs- Variadic,WasmSSA_ValType, variadic of 32-bit signless integer or 64-bit signless integer or 32-bit float or 64-bit float or 128-bit signless integer or Opaque type for function reference or Opaque type for external reference
wasmssa.lt - Check if a float value is less than another
This op has support for result type inference.
Operands
lhs- Single, anonymous/composite constraint, 32-bit float or 64-bit floatrhs- Single, anonymous/composite constraint, 32-bit float or 64-bit float
Results
result- Single,I32, 32-bit signless integer
Description
Example:
```mlir
%a = wasmssa.lt %b %c : i32
```
wasmssa.lt_si - Check if a signed integer value is less than another
This op has support for result type inference.
Operands
lhs- Single, anonymous/composite constraint, 32-bit signless integer or 64-bit signless integerrhs- Single, anonymous/composite constraint, 32-bit signless integer or 64-bit signless integer
Results
result- Single,I32, 32-bit signless integer
Description
Example:
```mlir
%a = wasmssa.lt_si %b %c : i32
```
wasmssa.lt_ui - Check if an unsigned integer value is less than another
This op has support for result type inference.
Operands
lhs- Single, anonymous/composite constraint, 32-bit signless integer or 64-bit signless integerrhs- Single, anonymous/composite constraint, 32-bit signless integer or 64-bit signless integer
Results
result- Single,I32, 32-bit signless integer
Description
Example:
```mlir
%a = wasmssa.lt_ui %b %c : i32
```
wasmssa.max - Compute the minimum of two floating point values.
This op has support for result type inference.
Operands
lhs- Single, anonymous/composite constraint, 32-bit float or 64-bit floatrhs- Single, anonymous/composite constraint, 32-bit float or 64-bit float
Results
result- Single, anonymous/composite constraint, 32-bit float or 64-bit float
Description
Example:
```mlir
%a = wasmssa.max %b %c : f32
```
wasmssa.memory
wasmssa.min - Compute the minimum of two floating point values.
This op has support for result type inference.
Operands
lhs- Single, anonymous/composite constraint, 32-bit float or 64-bit floatrhs- Single, anonymous/composite constraint, 32-bit float or 64-bit float
Results
result- Single, anonymous/composite constraint, 32-bit float or 64-bit float
Description
Example:
```mlir
%a = wasmssa.min %b %c : f32
```
wasmssa.mul - Multiply two values
This op has support for result type inference.
Operands
lhs- Single, anonymous/composite constraint, 32-bit signless integer or 64-bit signless integer or 32-bit float or 64-bit floatrhs- Single, anonymous/composite constraint, 32-bit signless integer or 64-bit signless integer or 32-bit float or 64-bit float
Results
result- Single, anonymous/composite constraint, 32-bit signless integer or 64-bit signless integer or 32-bit float or 64-bit float
Description
Example:
```mlir
%a = wasmssa.mul %b %c : i32
```
wasmssa.ne - Check if two values are different
This op has support for result type inference.
Operands
lhs- Single, anonymous/composite constraint, 32-bit signless integer or 64-bit signless integer or 32-bit float or 64-bit floatrhs- Single, anonymous/composite constraint, 32-bit signless integer or 64-bit signless integer or 32-bit float or 64-bit float
Results
result- Single,I32, 32-bit signless integer
Description
Example:
```mlir
%a = wasmssa.ne %b %c : i32
```
wasmssa.neg - Floating point negation
This op has support for result type inference.
Operands
src- Single, anonymous/composite constraint, 32-bit float or 64-bit float
Results
result- Single, anonymous/composite constraint, 32-bit float or 64-bit float
Description
Example:
```mlir
%a = wasmssa.neg %b : f32
```
wasmssa.or - Compute the bitwise OR of two values
This op has support for result type inference.
Operands
lhs- Single, anonymous/composite constraint, 32-bit signless integer or 64-bit signless integer or 32-bit float or 64-bit floatrhs- Single, anonymous/composite constraint, 32-bit signless integer or 64-bit signless integer or 32-bit float or 64-bit float
Results
result- Single, anonymous/composite constraint, 32-bit signless integer or 64-bit signless integer or 32-bit float or 64-bit float
Description
Example:
```mlir
%a = wasmssa.or %b %c : i32
```
wasmssa.popcnt - Population count of an integer.
This op has support for result type inference.
Operands
src- Single, anonymous/composite constraint, 32-bit signless integer or 64-bit signless integer
Results
result- Single, anonymous/composite constraint, 32-bit signless integer or 64-bit signless integer
Description
Example:
```mlir
%a = wasmssa.popcnt %b : i32
```
wasmssa.promote - Get f64 representation of a f32 value.
Operands
input- Single, anonymous/composite constraint, 32-bit floating-point type
Results
result- Single, anonymous/composite constraint, 64-bit floating-point type
Description
Example:
```mlir
%a = wasmssa.promote %b : f32 to f64
```
wasmssa.reinterpret - Reinterpret the value represented by a bit vector by
bit-casting it to another type of same representation width.Operands
input- Single, anonymous/composite constraint, 32-bit signless integer or 64-bit signless integer or 32-bit float or 64-bit float
Results
result- Single, anonymous/composite constraint, 32-bit signless integer or 64-bit signless integer or 32-bit float or 64-bit float
Description
Example:
```mlir
%a = wasmssa.reinterpret %b : f32 as i32
```
wasmssa.rem_si - Calculate the remainder of dividing two integer values as signed integer
This op has support for result type inference.
Operands
lhs- Single, anonymous/composite constraint, 32-bit signless integer or 64-bit signless integerrhs- Single, anonymous/composite constraint, 32-bit signless integer or 64-bit signless integer
Results
result- Single, anonymous/composite constraint, 32-bit signless integer or 64-bit signless integer
Description
Example:
```mlir
%a = wasmssa.rem_si %b %c : i32
```
wasmssa.rem_ui - Calculate the remainder of dividing two integer values as an unsigned integer
This op has support for result type inference.
Operands
lhs- Single, anonymous/composite constraint, 32-bit signless integer or 64-bit signless integerrhs- Single, anonymous/composite constraint, 32-bit signless integer or 64-bit signless integer
Results
result- Single, anonymous/composite constraint, 32-bit signless integer or 64-bit signless integer
Description
Example:
```mlir
%a = wasmssa.rem_ui %b %c : i32
```
wasmssa.return - Return from the current function frame
Operands
operands- Variadic,WasmSSA_ValType, variadic of 32-bit signless integer or 64-bit signless integer or 32-bit float or 64-bit float or 128-bit signless integer or Opaque type for function reference or Opaque type for external reference
wasmssa.rotl - Rotate left.
Consume an integer and an integer rotate. The first
integer shall be rotated left by N bits, where N is the value of the
second integer.This op has support for result type inference.
Operands
val- Single,WasmSSA_IntegerType, 32-bit signless integer or 64-bit signless integerbits- Single,WasmSSA_IntegerType, 32-bit signless integer or 64-bit signless integer
Results
result- Single,WasmSSA_IntegerType, 32-bit signless integer or 64-bit signless integer
Description
Example:
```mlir
%a = wasmssa.rotl %b by %c bits : i64
```
wasmssa.rotr - Rotate right.
Consume an integer, and an integer rotate. The first
integer shall be rotated right by N bits, where N is the value of the
second integer.This op has support for result type inference.
Operands
val- Single,WasmSSA_IntegerType, 32-bit signless integer or 64-bit signless integerbits- Single,WasmSSA_IntegerType, 32-bit signless integer or 64-bit signless integer
Results
result- Single,WasmSSA_IntegerType, 32-bit signless integer or 64-bit signless integer
Description
Example:
```mlir
%a = wasmssa.rotr %b by %c bits : i64
```
wasmssa.shl - Consume an integer and an integer shift amount. The first
integer shall be shifted left by N bits, where N is the value of the second
integer.This op has support for result type inference.
Operands
val- Single,WasmSSA_IntegerType, 32-bit signless integer or 64-bit signless integerbits- Single,WasmSSA_IntegerType, 32-bit signless integer or 64-bit signless integer
Results
result- Single,WasmSSA_IntegerType, 32-bit signless integer or 64-bit signless integer
Description
Example:
```mlir
%a = wasmssa.shl %b by %c bits : i64
```
wasmssa.shr_s - Arithmetic right shift.
Consume an integer and an integer shift amount. The first
integer shall be shifted right by N bits, where N is the value of the
second integer.
Vacated bits on the left shall be filled with the sign bit.This op has support for result type inference.
Operands
val- Single,WasmSSA_IntegerType, 32-bit signless integer or 64-bit signless integerbits- Single,WasmSSA_IntegerType, 32-bit signless integer or 64-bit signless integer
Results
result- Single,WasmSSA_IntegerType, 32-bit signless integer or 64-bit signless integer
Description
Example:
```mlir
%a = wasmssa.shr_s %b by %c bits : i64
```
wasmssa.shr_u - Logical right shift.
Consume an integer, and an integer shift amount. The first
integer shall be shifted right by N bits, where N is the value of the
second integer.
Vacated bits on the left shall be filled with zeroes.This op has support for result type inference.
Operands
val- Single,WasmSSA_IntegerType, 32-bit signless integer or 64-bit signless integerbits- Single,WasmSSA_IntegerType, 32-bit signless integer or 64-bit signless integer
Results
result- Single,WasmSSA_IntegerType, 32-bit signless integer or 64-bit signless integer
Description
Example:
```mlir
%a = wasmssa.shr_u %b by %c bits : i64
```
wasmssa.sqrt - Floating point square root
This op has support for result type inference.
Operands
src- Single, anonymous/composite constraint, 32-bit float or 64-bit float
Results
result- Single, anonymous/composite constraint, 32-bit float or 64-bit float
Description
Example:
```mlir
%a = wasmssa.sqrt %b : f32
```
wasmssa.sub - Subtract two values
This op has support for result type inference.
Operands
lhs- Single, anonymous/composite constraint, 32-bit signless integer or 64-bit signless integer or 32-bit float or 64-bit floatrhs- Single, anonymous/composite constraint, 32-bit signless integer or 64-bit signless integer or 32-bit float or 64-bit float
Results
result- Single, anonymous/composite constraint, 32-bit signless integer or 64-bit signless integer or 32-bit float or 64-bit float
Description
Example:
```mlir
%a = wasmssa.sub %b %c : i32
```
wasmssa.table
wasmssa.trunc - Trunc of floating point value
This op has support for result type inference.
Operands
src- Single, anonymous/composite constraint, 32-bit float or 64-bit float
Results
result- Single, anonymous/composite constraint, 32-bit float or 64-bit float
Description
Example:
```mlir
%a = wasmssa.trunc %b : f32
```
wasmssa.wrap - Cast an i64 to i32 by using a wrapping mechanism: y = x mod 2^32
Operands
input- Single, anonymous/composite constraint, 64-bit signless integer
Results
result- Single, anonymous/composite constraint, 32-bit signless integer
Description
Example:
```mlir
%a = wasmssa.wrap %b : i64 to i32
```
wasmssa.xor - Compute the bitwise XOR of two values
This op has support for result type inference.
Operands
lhs- Single, anonymous/composite constraint, 32-bit signless integer or 64-bit signless integer or 32-bit float or 64-bit floatrhs- Single, anonymous/composite constraint, 32-bit signless integer or 64-bit signless integer or 32-bit float or 64-bit float
Results
result- Single, anonymous/composite constraint, 32-bit signless integer or 64-bit signless integer or 32-bit float or 64-bit float
Description
Example:
```mlir
%a = wasmssa.xor %b %c : i32
```