Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion compiler/noirc_evaluator/src/ssa/ir/instruction.rs
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,13 @@ pub enum Instruction {
/// Binary Operations like +, -, *, /, ==, !=
Binary(Binary),

/// Converts `Value` into the given NumericType
/// Converts `Value` into the given `NumericType`
///
/// This operation only changes the type of the value, it does not change the value itself.
Comment thread
TomAFrench marked this conversation as resolved.
/// It is expected that the value can fit into the target type.
/// For instance a value of type `u32` casted to `u8` must already fit into 8 bits
/// A value of type `i8` cannot be casted to 'i16' since the value would need to include the sign bit (which is the MSB)
/// Ssa code-gen must ensure that the necessary truncation or sign extension is performed when emitting a Cast instruction.
Cast(ValueId, NumericType),

/// Computes a bit wise not
Expand Down
Loading