icmp : Comparison -> LType -> LExpr -> LExpr -> LOperation
Create an integer comparison operation.
Creates an integer comparison operation using the specified predicate.
The comparison evaluates to an i1 (boolean) result that can be used
in conditional branches and other boolean contexts.
@ pred The comparison predicate (eq, ne, lt, gt, etc.)
@ ty The type of the operands being compared
@ lhs The left-hand side operand
@ rhs The right-hand side operand
Visibility: exportfcmp : Bool -> {default [] _ : FastMath} -> Comparison -> LType -> LExpr -> LExpr -> LOperation
Create a floating point comparison operation.
Visibility: exportudiv : {default False _ : Bool} -> LType -> LExpr -> LExpr -> LOperation
Create division operation (unsigned).
Visibility: exportsdiv : {default False _ : Bool} -> LType -> LExpr -> LExpr -> LOperation
Create division operation (signed).
Visibility: exportfdiv : {default [] _ : FastMath} -> LType -> LExpr -> LExpr -> LOperation
Create floating point division operation.
Visibility: exporturem : LType -> LExpr -> LExpr -> LOperation
Create remainder operation (unsigned).
Visibility: exportsrem : LType -> LExpr -> LExpr -> LOperation
Create remainder operation (signed).
Visibility: exportfrem : {default [] _ : FastMath} -> LType -> LExpr -> LExpr -> LOperation
Create floating point remainder operation.
Visibility: exportshl : {default Nothing _ : Maybe Wrapping} -> LType -> LExpr -> LExpr -> LOperation
Create shift left operation.
Visibility: exportlshr : {default False _ : Bool} -> LType -> LExpr -> LExpr -> LOperation
Create logical shift right operation.
Visibility: exportashr : {default False _ : Bool} -> LType -> LExpr -> LExpr -> LOperation
Create arithmetic shift right operation.
Visibility: exportand : LType -> LExpr -> LExpr -> LOperation
Create bitwise AND operation.
Creates a bitwise AND operation between two integer operands of the same type.
Each bit in the result is the logical AND of the corresponding bits in the operands.
@ ty The integer type of both operands (must be the same)
@ lhs The left-hand side operand
@ rhs The right-hand side operand
Visibility: exportor : {default False _ : Bool} -> LType -> LExpr -> LExpr -> LOperation
Create bitwise OR operation.
Creates a bitwise OR operation between two integer operands of the same type.
Each bit in the result is the logical OR of the corresponding bits in the operands.
Optionally can be marked as disjoint for optimization.
@ disjoint Whether the operands are disjoint (no common set bits)
@ ty The integer type of both operands (must be the same)
@ lhs The left-hand side operand
@ rhs The right-hand side operand
Visibility: exportxor : LType -> LExpr -> LExpr -> LOperation
Create bitwise XOR operation.
Creates a bitwise XOR operation between two integer operands of the same type.
Each bit in the result is the logical XOR of the corresponding bits in the operands.
@ ty The integer type of both operands (must be the same)
@ lhs The left-hand side operand
@ rhs The right-hand side operand
Visibility: export
Fixity Declaration: infixl operator, level 6add : LType -> LExpr -> LExpr -> LOperation
Create an add operation.
Creates an integer addition operation between two operands of the same type.
The operation performs standard arithmetic addition.
@ ty The integer type of both operands (must be the same)
@ lhs The left-hand side operand
@ rhs The right-hand side operand
Visibility: exportsub : LType -> LExpr -> LExpr -> LOperation
Create a subtract operation.
Creates an integer subtraction operation between two operands of the same type.
The operation performs standard arithmetic subtraction (lhs - rhs).
@ ty The integer type of both operands (must be the same)
@ lhs The left-hand side operand (minuend)
@ rhs The right-hand side operand (subtrahend)
Visibility: exportmul : LType -> LExpr -> LExpr -> LOperation
Create a multiply operation.
Creates an integer multiplication operation between two operands of the same type.
The operation performs standard arithmetic multiplication.
@ ty The integer type of both operands (must be the same)
@ lhs The left-hand side operand
@ rhs The right-hand side operand
Visibility: exporttrunc : {default Nothing _ : Maybe Wrapping} -> WithType LExpr -> LType -> LOperation
Create a truncate operation.
Visibility: exportzext : WithType LExpr -> LType -> LOperation
Create a zero extend operation.
Creates a zero extension operation that increases the bit width of an
integer value by padding with zeros in the high-order bits.
@ from The typed source value with smaller bit width
@ to The target type with larger bit width
Visibility: exportsext : WithType LExpr -> LType -> LOperation
Create a sign extend operation.
Creates a sign extension operation that increases the bit width of a
signed integer value by replicating the sign bit in the high-order bits.
@ from The typed source value with smaller bit width
@ to The target type with larger bit width
Visibility: exportbitcast : WithType LExpr -> LType -> LOperation
Create a bitcast operation.
Creates a bitcast operation that reinterprets the bits of a value as
a different type without changing the bit pattern. Both types must
have the same size.
@ from The typed source value to reinterpret
@ to The target type to reinterpret as
Visibility: exportfptrunc : {default [] _ : FastMath} -> WithType LExpr -> LType -> LOperation
Create a floating point truncate operation.
Visibility: exportfpext : {default [] _ : FastMath} -> WithType LExpr -> LType -> LOperation
Create a floating point extend operation.
Visibility: exportaddWrap : Wrapping -> LType -> LExpr -> LExpr -> LOperation
Create addition with wrapping flags.
Visibility: exportsubWrap : Wrapping -> LType -> LExpr -> LExpr -> LOperation
Create subtraction with wrapping flags.
Visibility: exportmulWrap : Wrapping -> LType -> LExpr -> LExpr -> LOperation
Create multiplication with wrapping flags.
Visibility: exportshlWrap : Wrapping -> LType -> LExpr -> LExpr -> LOperation
Create shift left with wrapping flags.
Visibility: exporticmpEq : LType -> LExpr -> LExpr -> LOperation
Integer comparison: equal.
Visibility: exporticmpNe : LType -> LExpr -> LExpr -> LOperation
Integer comparison: not equal.
Visibility: exporticmpULt : LType -> LExpr -> LExpr -> LOperation
Integer comparison: unsigned less than.
Visibility: exporticmpSLt : LType -> LExpr -> LExpr -> LOperation
Integer comparison: signed less than.
Visibility: exporticmpUGt : LType -> LExpr -> LExpr -> LOperation
Integer comparison: unsigned greater than.
Visibility: exporticmpSGt : LType -> LExpr -> LExpr -> LOperation
Integer comparison: signed greater than.
Visibility: exporticmpULe : LType -> LExpr -> LExpr -> LOperation
Integer comparison: unsigned less than or equal.
Visibility: exporticmpSLe : LType -> LExpr -> LExpr -> LOperation
Integer comparison: signed less than or equal.
Visibility: exporticmpUGe : LType -> LExpr -> LExpr -> LOperation
Integer comparison: unsigned greater than or equal.
Visibility: exporticmpSGe : LType -> LExpr -> LExpr -> LOperation
Integer comparison: signed greater than or equal.
Visibility: exportfneg : LType -> LExpr -> LOperation
Create a floating point negation operation.
Visibility: exportfadd : {default [] _ : FastMath} -> LType -> LExpr -> LExpr -> LOperation
Create floating point addition with fast math flags.
Visibility: exportfsub : {default [] _ : FastMath} -> LType -> LExpr -> LExpr -> LOperation
Create floating point subtraction with fast math flags.
Visibility: exportfmul : {default [] _ : FastMath} -> LType -> LExpr -> LExpr -> LOperation
Create floating point multiplication with fast math flags.
Visibility: export