logo
pub enum SpecConstantInstruction {
Show 59 variants AccessChain { base: Id, indexes: Vec<Id>, }, InBoundsAccessChain { base: Id, indexes: Vec<Id>, }, PtrAccessChain { base: Id, element: Id, indexes: Vec<Id>, }, InBoundsPtrAccessChain { base: Id, element: Id, indexes: Vec<Id>, }, VectorShuffle { vector_1: Id, vector_2: Id, components: Vec<u32>, }, CompositeExtract { composite: Id, indexes: Vec<u32>, }, CompositeInsert { object: Id, composite: Id, indexes: Vec<u32>, }, ConvertFToU { float_value: Id, }, ConvertFToS { float_value: Id, }, ConvertSToF { signed_value: Id, }, ConvertUToF { unsigned_value: Id, }, UConvert { unsigned_value: Id, }, SConvert { signed_value: Id, }, FConvert { float_value: Id, }, QuantizeToF16 { value: Id, }, ConvertPtrToU { pointer: Id, }, ConvertUToPtr { integer_value: Id, }, PtrCastToGeneric { pointer: Id, }, GenericCastToPtr { pointer: Id, }, Bitcast { operand: Id, }, SNegate { operand: Id, }, FNegate { operand: Id, }, IAdd { operand1: Id, operand2: Id, }, FAdd { operand1: Id, operand2: Id, }, ISub { operand1: Id, operand2: Id, }, FSub { operand1: Id, operand2: Id, }, IMul { operand1: Id, operand2: Id, }, FMul { operand1: Id, operand2: Id, }, UDiv { operand1: Id, operand2: Id, }, SDiv { operand1: Id, operand2: Id, }, FDiv { operand1: Id, operand2: Id, }, UMod { operand1: Id, operand2: Id, }, SRem { operand1: Id, operand2: Id, }, SMod { operand1: Id, operand2: Id, }, FRem { operand1: Id, operand2: Id, }, FMod { operand1: Id, operand2: Id, }, LogicalEqual { operand1: Id, operand2: Id, }, LogicalNotEqual { operand1: Id, operand2: Id, }, LogicalOr { operand1: Id, operand2: Id, }, LogicalAnd { operand1: Id, operand2: Id, }, LogicalNot { operand: Id, }, Select { condition: Id, object_1: Id, object_2: Id, }, IEqual { operand1: Id, operand2: Id, }, INotEqual { operand1: Id, operand2: Id, }, UGreaterThan { operand1: Id, operand2: Id, }, SGreaterThan { operand1: Id, operand2: Id, }, UGreaterThanEqual { operand1: Id, operand2: Id, }, SGreaterThanEqual { operand1: Id, operand2: Id, }, ULessThan { operand1: Id, operand2: Id, }, SLessThan { operand1: Id, operand2: Id, }, ULessThanEqual { operand1: Id, operand2: Id, }, SLessThanEqual { operand1: Id, operand2: Id, }, ShiftRightLogical { base: Id, shift: Id, }, ShiftRightArithmetic { base: Id, shift: Id, }, ShiftLeftLogical { base: Id, shift: Id, }, BitwiseOr { operand1: Id, operand2: Id, }, BitwiseXor { operand1: Id, operand2: Id, }, BitwiseAnd { operand1: Id, operand2: Id, }, Not { operand: Id, },
}
Expand description

An instruction that is used as the operand of the SpecConstantOp instruction.

Variants

AccessChain

Fields

base: Id
indexes: Vec<Id>

InBoundsAccessChain

Fields

base: Id
indexes: Vec<Id>

PtrAccessChain

Fields

base: Id
element: Id
indexes: Vec<Id>

InBoundsPtrAccessChain

Fields

base: Id
element: Id
indexes: Vec<Id>

VectorShuffle

Fields

vector_1: Id
vector_2: Id
components: Vec<u32>

CompositeExtract

Fields

composite: Id
indexes: Vec<u32>

CompositeInsert

Fields

object: Id
composite: Id
indexes: Vec<u32>

ConvertFToU

Fields

float_value: Id

ConvertFToS

Fields

float_value: Id

ConvertSToF

Fields

signed_value: Id

ConvertUToF

Fields

unsigned_value: Id

UConvert

Fields

unsigned_value: Id

SConvert

Fields

signed_value: Id

FConvert

Fields

float_value: Id

QuantizeToF16

Fields

value: Id

ConvertPtrToU

Fields

pointer: Id

ConvertUToPtr

Fields

integer_value: Id

PtrCastToGeneric

Fields

pointer: Id

GenericCastToPtr

Fields

pointer: Id

Bitcast

Fields

operand: Id

SNegate

Fields

operand: Id

FNegate

Fields

operand: Id

IAdd

Fields

operand1: Id
operand2: Id

FAdd

Fields

operand1: Id
operand2: Id

ISub

Fields

operand1: Id
operand2: Id

FSub

Fields

operand1: Id
operand2: Id

IMul

Fields

operand1: Id
operand2: Id

FMul

Fields

operand1: Id
operand2: Id

UDiv

Fields

operand1: Id
operand2: Id

SDiv

Fields

operand1: Id
operand2: Id

FDiv

Fields

operand1: Id
operand2: Id

UMod

Fields

operand1: Id
operand2: Id

SRem

Fields

operand1: Id
operand2: Id

SMod

Fields

operand1: Id
operand2: Id

FRem

Fields

operand1: Id
operand2: Id

FMod

Fields

operand1: Id
operand2: Id

LogicalEqual

Fields

operand1: Id
operand2: Id

LogicalNotEqual

Fields

operand1: Id
operand2: Id

LogicalOr

Fields

operand1: Id
operand2: Id

LogicalAnd

Fields

operand1: Id
operand2: Id

LogicalNot

Fields

operand: Id

Select

Fields

condition: Id
object_1: Id
object_2: Id

IEqual

Fields

operand1: Id
operand2: Id

INotEqual

Fields

operand1: Id
operand2: Id

UGreaterThan

Fields

operand1: Id
operand2: Id

SGreaterThan

Fields

operand1: Id
operand2: Id

UGreaterThanEqual

Fields

operand1: Id
operand2: Id

SGreaterThanEqual

Fields

operand1: Id
operand2: Id

ULessThan

Fields

operand1: Id
operand2: Id

SLessThan

Fields

operand1: Id
operand2: Id

ULessThanEqual

Fields

operand1: Id
operand2: Id

SLessThanEqual

Fields

operand1: Id
operand2: Id

ShiftRightLogical

Fields

base: Id
shift: Id

ShiftRightArithmetic

Fields

base: Id
shift: Id

ShiftLeftLogical

Fields

base: Id
shift: Id

BitwiseOr

Fields

operand1: Id
operand2: Id

BitwiseXor

Fields

operand1: Id
operand2: Id

BitwiseAnd

Fields

operand1: Id
operand2: Id

Not

Fields

operand: Id

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.