[][src]Enum souper_ir::ast::Instruction

pub enum Instruction {
    Add {
        a: Operand,
        b: Operand,
    },
    AddNsw {
        a: Operand,
        b: Operand,
    },
    AddNuw {
        a: Operand,
        b: Operand,
    },
    AddNw {
        a: Operand,
        b: Operand,
    },
    Sub {
        a: Operand,
        b: Operand,
    },
    SubNsw {
        a: Operand,
        b: Operand,
    },
    SubNuw {
        a: Operand,
        b: Operand,
    },
    SubNw {
        a: Operand,
        b: Operand,
    },
    Mul {
        a: Operand,
        b: Operand,
    },
    MulNsw {
        a: Operand,
        b: Operand,
    },
    MulNuw {
        a: Operand,
        b: Operand,
    },
    MulNw {
        a: Operand,
        b: Operand,
    },
    Udiv {
        a: Operand,
        b: Operand,
    },
    Sdiv {
        a: Operand,
        b: Operand,
    },
    UdivExact {
        a: Operand,
        b: Operand,
    },
    SdivExact {
        a: Operand,
        b: Operand,
    },
    Urem {
        a: Operand,
        b: Operand,
    },
    Srem {
        a: Operand,
        b: Operand,
    },
    And {
        a: Operand,
        b: Operand,
    },
    Or {
        a: Operand,
        b: Operand,
    },
    Xor {
        a: Operand,
        b: Operand,
    },
    Shl {
        a: Operand,
        b: Operand,
    },
    ShlNsw {
        a: Operand,
        b: Operand,
    },
    ShlNuw {
        a: Operand,
        b: Operand,
    },
    ShlNw {
        a: Operand,
        b: Operand,
    },
    Lshr {
        a: Operand,
        b: Operand,
    },
    LshrExact {
        a: Operand,
        b: Operand,
    },
    Ashr {
        a: Operand,
        b: Operand,
    },
    AshrExact {
        a: Operand,
        b: Operand,
    },
    Select {
        a: Operand,
        b: Operand,
        c: Operand,
    },
    Zext {
        a: Operand,
    },
    Sext {
        a: Operand,
    },
    Trunc {
        a: Operand,
    },
    Eq {
        a: Operand,
        b: Operand,
    },
    Ne {
        a: Operand,
        b: Operand,
    },
    Ult {
        a: Operand,
        b: Operand,
    },
    Slt {
        a: Operand,
        b: Operand,
    },
    Ule {
        a: Operand,
        b: Operand,
    },
    Sle {
        a: Operand,
        b: Operand,
    },
    Ctpop {
        a: Operand,
    },
    Bswap {
        a: Operand,
    },
    BitReverse {
        a: Operand,
    },
    Cttz {
        a: Operand,
    },
    Ctlz {
        a: Operand,
    },
    Fshl {
        a: Operand,
        b: Operand,
        c: Operand,
    },
    Fshr {
        a: Operand,
        b: Operand,
        c: Operand,
    },
    SaddWithOverflow {
        a: Operand,
        b: Operand,
    },
    UaddWithOverflow {
        a: Operand,
        b: Operand,
    },
    SsubWithOverflow {
        a: Operand,
        b: Operand,
    },
    UsubWithOverflow {
        a: Operand,
        b: Operand,
    },
    SmulWithOverflow {
        a: Operand,
        b: Operand,
    },
    UmulWithOverflow {
        a: Operand,
        b: Operand,
    },
    SaddSat {
        a: Operand,
        b: Operand,
    },
    UaddSat {
        a: Operand,
        b: Operand,
    },
    SsubSat {
        a: Operand,
        b: Operand,
    },
    UsubSat {
        a: Operand,
        b: Operand,
    },
    ExtractValue {
        a: Operand,
        b: Operand,
    },
    Hole,
    Freeze {
        a: Operand,
    },
}

A Souper instruction.

Variants

Add

Wrapping integer addition.

Fields of Add

a: Operandb: Operand
AddNsw

Integer addition where signed overflow is undefined behavior.

Fields of AddNsw

a: Operandb: Operand
AddNuw

Integer addition where unsigned overflow is undefined behavior.

Fields of AddNuw

a: Operandb: Operand
AddNw

Integer addition where any kind of overflow is undefined behavior.

Fields of AddNw

a: Operandb: Operand
Sub

Wrapping integer subtraction.

Fields of Sub

a: Operandb: Operand
SubNsw

Integer subtraction where signed overflow is undefined behavior.

Fields of SubNsw

a: Operandb: Operand
SubNuw

Integer subtraction where unsigned overflow is undefined behavior.

Fields of SubNuw

a: Operandb: Operand
SubNw

Integer subtraction where any kind of overflow is undefined behavior.

Fields of SubNw

a: Operandb: Operand
Mul

Wrapping integer multiplication.

Fields of Mul

a: Operandb: Operand
MulNsw

Integer multiplication where signed overflow is undefined behavior.

Fields of MulNsw

a: Operandb: Operand
MulNuw

Integer multiplication where unsigned overflow is undefined behavior.

Fields of MulNuw

a: Operandb: Operand
MulNw

Integer multiplication where any kind of overflow is undefined behavior.

Fields of MulNw

a: Operandb: Operand
Udiv

Unsigned integer division.

Fields of Udiv

a: Operandb: Operand
Sdiv

Signed integer division.

Fields of Sdiv

a: Operandb: Operand
UdivExact

Unsigned division where a must be exactly divisible by b. If a is not exactly divisible by b, then the result is undefined behavior.

Fields of UdivExact

a: Operandb: Operand
SdivExact

Signed division where a must be exactly divisible by b. If a is not exactly divisible by b, then the result is undefined behavior.

Fields of SdivExact

a: Operandb: Operand
Urem

Unsigned integer remainder.

Fields of Urem

a: Operandb: Operand
Srem

Signed integer remainder.

Fields of Srem

a: Operandb: Operand
And

Bit-wise and.

Fields of And

a: Operandb: Operand
Or

Bit-wise or.

Fields of Or

a: Operandb: Operand
Xor

Bit-wise xor.

Fields of Xor

a: Operandb: Operand
Shl

Bit shift left. Undefined behavior if b is greater than or equal to bitwidth(a).

Fields of Shl

a: Operandb: Operand
ShlNsw

Bit shift left where shifting out any non-sign bits is undefined behavior.

Fields of ShlNsw

a: Operandb: Operand
ShlNuw

Bit shift left where shifting out any non-zero bits is undefined behavior.

Fields of ShlNuw

a: Operandb: Operand
ShlNw

Bit shift left where shifting out any non-zero or non-sign bits is undefined behavior.

Fields of ShlNw

a: Operandb: Operand
Lshr

Logical bit shift right (fills left b bits with zero). Undefined behavior if b is greater than or equal to bitwidth(a).

Fields of Lshr

a: Operandb: Operand
LshrExact

Logical bit shift right (fills left b bits with zero) where it is undefined behavior if any bits shifted out are non-zero.

Fields of LshrExact

a: Operandb: Operand
Ashr

Arithmetic bit shift right (sign extends the left b bits).

Fields of Ashr

a: Operandb: Operand
AshrExact

Arithmetic bit shift right (fills left b bits with zero) where it is undefined behavior if any bits shifted out are non-zero.

Fields of AshrExact

a: Operandb: Operand
Select

If a is 1, then evaluates to b, otherwise evaluates to c.

Fields of Select

a: Operandb: Operandc: Operand
Zext

Zero extend a.

Fields of Zext

a: Operand
Sext

Sign extend a.

Fields of Sext

a: Operand
Trunc

Truncate a.

Fields of Trunc

a: Operand
Eq

a == b.

Fields of Eq

a: Operandb: Operand
Ne

a != b

Fields of Ne

a: Operandb: Operand
Ult

Unsigned less than.

Fields of Ult

a: Operandb: Operand
Slt

Signed less than.

Fields of Slt

a: Operandb: Operand
Ule

Unsigned less than or equal.

Fields of Ule

a: Operandb: Operand
Sle

Signed less than or equal.

Fields of Sle

a: Operandb: Operand
Ctpop

Count the number of 1 bits in a.

Fields of Ctpop

a: Operand
Bswap

Swap bytes in a, e.g. 0xaabbccdd becomes 0xddccbbaa.

Fields of Bswap

a: Operand
BitReverse

Reverse the bits in a.

Fields of BitReverse

a: Operand
Cttz

Count trailing zero bits in a.

Fields of Cttz

a: Operand
Ctlz

Count leading one bits in a.

Fields of Ctlz

a: Operand
Fshl

Left funnel shift.

Fields of Fshl

a: Operandb: Operandc: Operand
Fshr

Right funnel shift.

Fields of Fshr

a: Operandb: Operandc: Operand
SaddWithOverflow

Wrapping signed integer addition of a and b where the result is extended by one bit which indicates whether the addition overflowed.

Fields of SaddWithOverflow

a: Operandb: Operand
UaddWithOverflow

Wrapping unsigned integer addition of a and b where the result is extended by one bit which indicates whether the addition overflowed.

Fields of UaddWithOverflow

a: Operandb: Operand
SsubWithOverflow

Wrapping signed integer subtraction of a and b where the result is extended by one bit which indicates whether the subtraction overflowed.

Fields of SsubWithOverflow

a: Operandb: Operand
UsubWithOverflow

Wrapping unsigned integer subtraction of a and b where the result is extended by one bit which indicates whether the subtraction overflowed.

Fields of UsubWithOverflow

a: Operandb: Operand
SmulWithOverflow

Wrapping signed integer multiplication of a and b where the result is extended by one bit which indicates whether the multiplication overflowed.

Fields of SmulWithOverflow

a: Operandb: Operand
UmulWithOverflow

Wrapping unsigned integer multiplication of a and b where the result is extended by one bit which indicates whether the multiplication overflowed.

Fields of UmulWithOverflow

a: Operandb: Operand
SaddSat

Signed saturating integer addition.

Fields of SaddSat

a: Operandb: Operand
UaddSat

Unsigned saturating integer addition.

Fields of UaddSat

a: Operandb: Operand
SsubSat

Signed saturating integer subtraction.

Fields of SsubSat

a: Operandb: Operand
UsubSat

Unsigned saturating integer subtraction.

Fields of UsubSat

a: Operandb: Operand
ExtractValue

Extract the bth value from a.

Fields of ExtractValue

a: Operandb: Operand
Hole

A hole reserved for an unknown instruction or value.

Freeze

If a is a poison or undef value, returns an arbitrary but fixed value. Otherwise returns a.

Fields of Freeze

a: Operand

Trait Implementations

impl Clone for Instruction[src]

impl Copy for Instruction[src]

impl Debug for Instruction[src]

impl From<Instruction> for AssignmentRhs[src]

impl Parse for Instruction[src]

impl Peek for Instruction[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.