NIR ALU Instructions

ALU instructions represent simple operations, such as addition, multiplication, comparison, etc., that take a certain number of arguments and return a result that only depends on the arguments. ALU instructions in NIR must be pure in the sense that they have no side effect and that identical inputs yields an identical output. A good rule of thumb is that only things which can be constant folded should be ALU operations. If it can’t be constant folded, then it should probably be an intrinsic instead.

Each ALU instruction has an opcode, which is a member of the nir_op enum, that describes what it does as well as how many arguments it takes. Associated with each opcode is an metadata structure, nir_op_info, which shows how many arguments the opcode takes, information about data types, and algebraic properties such as associativity and commutivity. The info structure for each opcode may be accessed through a global nir_op_infos array that’s indexed by the opcode.

ALU operations are typeless, meaning that they’re only defined to convert a certain bit-pattern input to another bit-pattern output. The only concrete notion of types for a NIR SSA value or register is that each value has a number of vector components and a bit-size. How that data is interpreted is entirely controlled by the opcode. NIR doesn’t have opcodes for intBitsToFloat() and friends because they are implicit.

Even though ALU operations are typeless, each opcode also has an “ALU type” metadata for each of the sources and the destination which can be floating-point, boolean, integer, or unsigned integer. The ALU type mainly helps back-ends which want to handle all conversion instructions, for instance, in a single switch case. They’re also important when a back-end requests the absolute value, negate, and saturate modifiers (not used by core NIR). In that case, modifiers are interpreted with respect to the ALU type on the source or destination of the instruction. In addition, if an operation takes a boolean argument, then the argument may be assumed to be either 0 for false or ~0 (a.k.a -1) for true even if it is not a 1-bit value. If an operation’s result has a boolean type, then it may only produce only 0 or ~0.

Most of the common ALU ops in NIR operate per-component, meaning that the operation is defined by what it does on a single scalar value and, when performed on vectors, it performs the same operation on each component. Things like add, multiply, etc. fall into this category. Per-component operations naturally scale to as many components as necessary. Non-per-component ALU ops are things like vec4 or pack_64_2x32 where any given component in the result value may be a combination of any component in any source. These ops have a number of destination components and a number of components required by each source which is fixed by the opcode.

While most instruction types in NIR require vector sizes to perfectly match on inputs and outputs, ALU instruction sources have an additional nir_alu_src::swizzle field which allows them to act on vectors which are not the native vector size of the instruction. This is ideal for hardware with a native data type of vec4 but also means that ALU instructions are often used (and required) for packing/unpacking vectors for use in other instruction types like intrinsics or texture ops.

struct nir_op_info

Public Members

const char *name

Name of the NIR ALU opcode

uint8_t num_inputs

Number of inputs (sources)

uint8_t output_size

The number of components in the output

If non-zero, this is the size of the output and input sizes are explicitly given; swizzle and writemask are still in effect, but if the output component is masked out, then the input component may still be in use.

If zero, the opcode acts in the standard, per-component manner; the operation is performed on each component (except the ones that are masked out) with the input being taken from the input swizzle for that component.

The size of some of the inputs may be given (i.e. non-zero) even though output_size is zero; in that case, the inputs with a zero size act per-component, while the inputs with non-zero size don’t.

nir_alu_type output_type

The type of vector that the instruction outputs. Note that the staurate modifier is only allowed on outputs with the float type.

uint8_t input_sizes[NIR_ALU_MAX_INPUTS]

The number of components in each input

See nir_op_infos::output_size for more detail about the relationship between input and output sizes.

nir_alu_type input_types[NIR_ALU_MAX_INPUTS]

The type of vector that each input takes. Note that negate and absolute value are only allowed on inputs with int or float type and behave differently on the two.

nir_op_algebraic_property algebraic_properties

Algebraic properties of this opcode

bool is_conversion

Whether this represents a numeric conversion opcode

const nir_op_info nir_op_infos[nir_num_opcodes]

Metadata for each nir_op, indexed by opcode

struct nir_alu_instr

Public Members

nir_instr instr

Base instruction

nir_op op

Opcode

bool exact

Indicates that this ALU instruction generates an exact value

This is kind of a mixture of GLSL “precise” and “invariant” and not really equivalent to either. This indicates that the value generated by this operation is high-precision and any code transformations that touch it must ensure that the resulting value is bit-for-bit identical to the original.

bool no_signed_wrap

Indicates that this instruction doese not cause signed integer wrapping to occur, in the form of overflow or underflow.

bool no_unsigned_wrap

Indicates that this instruction does not cause unsigned integer wrapping to occur, in the form of overflow or underflow.

nir_alu_dest dest

Destination

nir_alu_src src[]

Sources

The size of the array is given by nir_op_info::num_inputs.

struct nir_alu_src

input modifiers

bool negate

For inputs interpreted as floating point, flips the sign bit. For inputs interpreted as integers, performs the two’s complement negation.

bool abs

Clears the sign bit for floating point values, and computes the integer absolute value for integers. Note that the negate modifier acts after the absolute value modifier, therefore if both are set then all inputs will become negative.

uint8_t swizzle[NIR_MAX_VEC_COMPONENTS]

For each input component, says which component of the register it is chosen from.

Note that which elements of the swizzle are used and which are ignored are based on the write mask for most opcodes - for example, a statement like “foo.xzw = bar.zyx” would have a writemask of 1101b and a swizzle of {2, 1, x, 0} where x means “don’t care.”

Public Members

nir_src src

Base source

struct nir_alu_dest

Public Members

nir_dest dest

Base destination

bool saturate

Saturate output modifier

Only valid for opcodes that output floating-point numbers. Clamps the output to between 0.0 and 1.0 inclusive.

unsigned write_mask

Write-mask

Ignored if dest.is_ssa is true

NIR ALU Opcode Reference:

mov(uint[N] src0)uint[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Constant-folding:

src0

Builder function:

nir_ssa_def *nir_mov(nir_builder*, nir_ssa_def *src0)
ineg(int[N] src0)int[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Constant-folding:

-src0

Builder function:

nir_ssa_def *nir_ineg(nir_builder*, nir_ssa_def *src0)
fneg(float[N] src0)float[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Constant-folding:

-src0

Builder function:

nir_ssa_def *nir_fneg(nir_builder*, nir_ssa_def *src0)
inot(int[N] src0)int[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Constant-folding:

~src0

Builder function:

nir_ssa_def *nir_inot(nir_builder*, nir_ssa_def *src0)
fsign(float[N] src0)float[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Constant-folding:

bit_size == 64 ? (isnan(src0) ? 0.0  : ((src0 == 0.0 ) ? src0 : (src0 > 0.0 ) ? 1.0  : -1.0 )) : (isnan(src0) ? 0.0f : ((src0 == 0.0f) ? src0 : (src0 > 0.0f) ? 1.0f : -1.0f))

Builder function:

nir_ssa_def *nir_fsign(nir_builder*, nir_ssa_def *src0)
isign(int[N] src0)int[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Constant-folding:

(src0 == 0) ? 0 : ((src0 > 0) ? 1 : -1)

Builder function:

nir_ssa_def *nir_isign(nir_builder*, nir_ssa_def *src0)
iabs(int[N] src0)int[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Constant-folding:

(src0 < 0) ? -src0 : src0

Builder function:

nir_ssa_def *nir_iabs(nir_builder*, nir_ssa_def *src0)
fabs(float[N] src0)float[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Constant-folding:

fabs(src0)

Builder function:

nir_ssa_def *nir_fabs(nir_builder*, nir_ssa_def *src0)
fsat(float[N] src0)float[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Constant-folding:

fmin(fmax(src0, 0.0), 1.0)

Builder function:

nir_ssa_def *nir_fsat(nir_builder*, nir_ssa_def *src0)
frcp(float[N] src0)float[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Constant-folding:

bit_size == 64 ? 1.0 / src0 : 1.0f / src0

Builder function:

nir_ssa_def *nir_frcp(nir_builder*, nir_ssa_def *src0)
frsq(float[N] src0)float[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Constant-folding:

bit_size == 64 ? 1.0 / sqrt(src0) : 1.0f / sqrtf(src0)

Builder function:

nir_ssa_def *nir_frsq(nir_builder*, nir_ssa_def *src0)
fsqrt(float[N] src0)float[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Constant-folding:

bit_size == 64 ? sqrt(src0) : sqrtf(src0)

Builder function:

nir_ssa_def *nir_fsqrt(nir_builder*, nir_ssa_def *src0)
fexp2(float[N] src0)float[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Constant-folding:

exp2f(src0)

Builder function:

nir_ssa_def *nir_fexp2(nir_builder*, nir_ssa_def *src0)
flog2(float[N] src0)float[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Constant-folding:

log2f(src0)

Builder function:

nir_ssa_def *nir_flog2(nir_builder*, nir_ssa_def *src0)
i2f16(int[N] src0)float16[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Constant-folding:

src0

Builder function:

nir_ssa_def *nir_i2f16(nir_builder*, nir_ssa_def *src0)
i2f32(int[N] src0)float32[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Constant-folding:

src0

Builder function:

nir_ssa_def *nir_i2f32(nir_builder*, nir_ssa_def *src0)
i2f64(int[N] src0)float64[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Constant-folding:

src0

Builder function:

nir_ssa_def *nir_i2f64(nir_builder*, nir_ssa_def *src0)
i2i1(int[N] src0)int1[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Constant-folding:

src0

Builder function:

nir_ssa_def *nir_i2i1(nir_builder*, nir_ssa_def *src0)
i2i8(int[N] src0)int8[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Constant-folding:

src0

Builder function:

nir_ssa_def *nir_i2i8(nir_builder*, nir_ssa_def *src0)
i2i16(int[N] src0)int16[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Constant-folding:

src0

Builder function:

nir_ssa_def *nir_i2i16(nir_builder*, nir_ssa_def *src0)
i2i32(int[N] src0)int32[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Constant-folding:

src0

Builder function:

nir_ssa_def *nir_i2i32(nir_builder*, nir_ssa_def *src0)
i2i64(int[N] src0)int64[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Constant-folding:

src0

Builder function:

nir_ssa_def *nir_i2i64(nir_builder*, nir_ssa_def *src0)
i2b1(int[N] src0)bool1[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Constant-folding:

src0 != 0

Builder function:

nir_ssa_def *nir_i2b1(nir_builder*, nir_ssa_def *src0)
i2b8(int[N] src0)bool8[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Constant-folding:

src0 != 0

Builder function:

nir_ssa_def *nir_i2b8(nir_builder*, nir_ssa_def *src0)
i2b16(int[N] src0)bool16[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Constant-folding:

src0 != 0

Builder function:

nir_ssa_def *nir_i2b16(nir_builder*, nir_ssa_def *src0)
i2b32(int[N] src0)bool32[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Constant-folding:

src0 != 0

Builder function:

nir_ssa_def *nir_i2b32(nir_builder*, nir_ssa_def *src0)
u2f16(uint[N] src0)float16[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Constant-folding:

src0

Builder function:

nir_ssa_def *nir_u2f16(nir_builder*, nir_ssa_def *src0)
u2f32(uint[N] src0)float32[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Constant-folding:

src0

Builder function:

nir_ssa_def *nir_u2f32(nir_builder*, nir_ssa_def *src0)
u2f64(uint[N] src0)float64[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Constant-folding:

src0

Builder function:

nir_ssa_def *nir_u2f64(nir_builder*, nir_ssa_def *src0)
u2u1(uint[N] src0)uint1[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Constant-folding:

src0

Builder function:

nir_ssa_def *nir_u2u1(nir_builder*, nir_ssa_def *src0)
u2u8(uint[N] src0)uint8[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Constant-folding:

src0

Builder function:

nir_ssa_def *nir_u2u8(nir_builder*, nir_ssa_def *src0)
u2u16(uint[N] src0)uint16[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Constant-folding:

src0

Builder function:

nir_ssa_def *nir_u2u16(nir_builder*, nir_ssa_def *src0)
u2u32(uint[N] src0)uint32[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Constant-folding:

src0

Builder function:

nir_ssa_def *nir_u2u32(nir_builder*, nir_ssa_def *src0)
u2u64(uint[N] src0)uint64[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Constant-folding:

src0

Builder function:

nir_ssa_def *nir_u2u64(nir_builder*, nir_ssa_def *src0)
f2i1(float[N] src0)int1[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Constant-folding:

src0

Builder function:

nir_ssa_def *nir_f2i1(nir_builder*, nir_ssa_def *src0)
f2i8(float[N] src0)int8[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Constant-folding:

src0

Builder function:

nir_ssa_def *nir_f2i8(nir_builder*, nir_ssa_def *src0)
f2i16(float[N] src0)int16[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Constant-folding:

src0

Builder function:

nir_ssa_def *nir_f2i16(nir_builder*, nir_ssa_def *src0)
f2i32(float[N] src0)int32[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Constant-folding:

src0

Builder function:

nir_ssa_def *nir_f2i32(nir_builder*, nir_ssa_def *src0)
f2i64(float[N] src0)int64[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Constant-folding:

src0

Builder function:

nir_ssa_def *nir_f2i64(nir_builder*, nir_ssa_def *src0)
f2u1(float[N] src0)uint1[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Constant-folding:

src0

Builder function:

nir_ssa_def *nir_f2u1(nir_builder*, nir_ssa_def *src0)
f2u8(float[N] src0)uint8[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Constant-folding:

src0

Builder function:

nir_ssa_def *nir_f2u8(nir_builder*, nir_ssa_def *src0)
f2u16(float[N] src0)uint16[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Constant-folding:

src0

Builder function:

nir_ssa_def *nir_f2u16(nir_builder*, nir_ssa_def *src0)
f2u32(float[N] src0)uint32[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Constant-folding:

src0

Builder function:

nir_ssa_def *nir_f2u32(nir_builder*, nir_ssa_def *src0)
f2u64(float[N] src0)uint64[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Constant-folding:

src0

Builder function:

nir_ssa_def *nir_f2u64(nir_builder*, nir_ssa_def *src0)
f2f16_rtne(float[N] src0)float16[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Constant-folding:

if (bit_size > 16) {
   dst = _mesa_half_to_float(_mesa_float_to_float16_rtne(src0));
} else {
   dst = src0;
}

Builder function:

nir_ssa_def *nir_f2f16_rtne(nir_builder*, nir_ssa_def *src0)
f2f16_rtz(float[N] src0)float16[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Constant-folding:

if (bit_size > 16) {
   dst = _mesa_half_to_float(_mesa_float_to_float16_rtz(src0));
} else {
   dst = src0;
}

Builder function:

nir_ssa_def *nir_f2f16_rtz(nir_builder*, nir_ssa_def *src0)
f2f16(float[N] src0)float16[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Constant-folding:

src0

Builder function:

nir_ssa_def *nir_f2f16(nir_builder*, nir_ssa_def *src0)
f2f32(float[N] src0)float32[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Constant-folding:

if (bit_size > 32 && nir_is_rounding_mode_rtz(execution_mode, 32)) {
   dst = _mesa_double_to_float_rtz(src0);
} else {
   dst = src0;
}

Builder function:

nir_ssa_def *nir_f2f32(nir_builder*, nir_ssa_def *src0)
f2f64(float[N] src0)float64[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Constant-folding:

src0

Builder function:

nir_ssa_def *nir_f2f64(nir_builder*, nir_ssa_def *src0)
f2b1(float[N] src0)bool1[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Constant-folding:

src0 != 0

Builder function:

nir_ssa_def *nir_f2b1(nir_builder*, nir_ssa_def *src0)
f2b8(float[N] src0)bool8[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Constant-folding:

src0 != 0

Builder function:

nir_ssa_def *nir_f2b8(nir_builder*, nir_ssa_def *src0)
f2b16(float[N] src0)bool16[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Constant-folding:

src0 != 0

Builder function:

nir_ssa_def *nir_f2b16(nir_builder*, nir_ssa_def *src0)
f2b32(float[N] src0)bool32[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Constant-folding:

src0 != 0

Builder function:

nir_ssa_def *nir_f2b32(nir_builder*, nir_ssa_def *src0)
b2f16(bool[N] src0)float16[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Constant-folding:

src0

Builder function:

nir_ssa_def *nir_b2f16(nir_builder*, nir_ssa_def *src0)
b2f32(bool[N] src0)float32[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Constant-folding:

src0

Builder function:

nir_ssa_def *nir_b2f32(nir_builder*, nir_ssa_def *src0)
b2f64(bool[N] src0)float64[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Constant-folding:

src0

Builder function:

nir_ssa_def *nir_b2f64(nir_builder*, nir_ssa_def *src0)
b2i1(bool[N] src0)int1[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Constant-folding:

src0

Builder function:

nir_ssa_def *nir_b2i1(nir_builder*, nir_ssa_def *src0)
b2i8(bool[N] src0)int8[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Constant-folding:

src0

Builder function:

nir_ssa_def *nir_b2i8(nir_builder*, nir_ssa_def *src0)
b2i16(bool[N] src0)int16[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Constant-folding:

src0

Builder function:

nir_ssa_def *nir_b2i16(nir_builder*, nir_ssa_def *src0)
b2i32(bool[N] src0)int32[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Constant-folding:

src0

Builder function:

nir_ssa_def *nir_b2i32(nir_builder*, nir_ssa_def *src0)
b2i64(bool[N] src0)int64[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Constant-folding:

src0

Builder function:

nir_ssa_def *nir_b2i64(nir_builder*, nir_ssa_def *src0)
b2b1(bool[N] src0)bool1[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Constant-folding:

src0 != 0

Builder function:

nir_ssa_def *nir_b2b1(nir_builder*, nir_ssa_def *src0)
b2b8(bool[N] src0)bool8[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Constant-folding:

src0 != 0

Builder function:

nir_ssa_def *nir_b2b8(nir_builder*, nir_ssa_def *src0)
b2b16(bool[N] src0)bool16[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Constant-folding:

src0 != 0

Builder function:

nir_ssa_def *nir_b2b16(nir_builder*, nir_ssa_def *src0)
b2b32(bool[N] src0)bool32[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Constant-folding:

src0 != 0

Builder function:

nir_ssa_def *nir_b2b32(nir_builder*, nir_ssa_def *src0)
f2fmp(float32[N] src0)float16[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Constant-folding:

src0

Builder function:

nir_ssa_def *nir_f2fmp(nir_builder*, nir_ssa_def *src0)
i2imp(int32[N] src0)int16[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Constant-folding:

src0

Builder function:

nir_ssa_def *nir_i2imp(nir_builder*, nir_ssa_def *src0)
f2imp(float32[N] src0)int16[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Constant-folding:

src0

Builder function:

nir_ssa_def *nir_f2imp(nir_builder*, nir_ssa_def *src0)
f2ump(float32[N] src0)uint16[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Constant-folding:

src0

Builder function:

nir_ssa_def *nir_f2ump(nir_builder*, nir_ssa_def *src0)
i2fmp(int32[N] src0)float16[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Constant-folding:

src0

Builder function:

nir_ssa_def *nir_i2fmp(nir_builder*, nir_ssa_def *src0)
u2fmp(uint32[N] src0)float16[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Constant-folding:

src0

Builder function:

nir_ssa_def *nir_u2fmp(nir_builder*, nir_ssa_def *src0)
ftrunc(float[N] src0)float[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Constant-folding:

bit_size == 64 ? trunc(src0) : truncf(src0)

Builder function:

nir_ssa_def *nir_ftrunc(nir_builder*, nir_ssa_def *src0)
fceil(float[N] src0)float[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Constant-folding:

bit_size == 64 ? ceil(src0) : ceilf(src0)

Builder function:

nir_ssa_def *nir_fceil(nir_builder*, nir_ssa_def *src0)
ffloor(float[N] src0)float[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Constant-folding:

bit_size == 64 ? floor(src0) : floorf(src0)

Builder function:

nir_ssa_def *nir_ffloor(nir_builder*, nir_ssa_def *src0)
ffract(float[N] src0)float[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Constant-folding:

src0 - (bit_size == 64 ? floor(src0) : floorf(src0))

Builder function:

nir_ssa_def *nir_ffract(nir_builder*, nir_ssa_def *src0)
fround_even(float[N] src0)float[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Constant-folding:

bit_size == 64 ? _mesa_roundeven(src0) : _mesa_roundevenf(src0)

Builder function:

nir_ssa_def *nir_fround_even(nir_builder*, nir_ssa_def *src0)
fquantize2f16(float[N] src0)float[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Constant-folding:

(fabs(src0) < ldexpf(1.0, -14)) ? copysignf(0.0f, src0) : _mesa_half_to_float(_mesa_float_to_half(src0))

Builder function:

nir_ssa_def *nir_fquantize2f16(nir_builder*, nir_ssa_def *src0)
fsin(float[N] src0)float[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Constant-folding:

bit_size == 64 ? sin(src0) : sinf(src0)

Builder function:

nir_ssa_def *nir_fsin(nir_builder*, nir_ssa_def *src0)
fcos(float[N] src0)float[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Constant-folding:

bit_size == 64 ? cos(src0) : cosf(src0)

Builder function:

nir_ssa_def *nir_fcos(nir_builder*, nir_ssa_def *src0)
frexp_exp(float[N] src0)int32[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Constant-folding:

frexp(src0, &dst);

Builder function:

nir_ssa_def *nir_frexp_exp(nir_builder*, nir_ssa_def *src0)
frexp_sig(float[N] src0)float[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Constant-folding:

int n; dst = frexp(src0, &n);

Builder function:

nir_ssa_def *nir_frexp_sig(nir_builder*, nir_ssa_def *src0)
fddx(float[N] src0)float[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Constant-folding:

0.0

Builder function:

nir_ssa_def *nir_fddx(nir_builder*, nir_ssa_def *src0)
fddy(float[N] src0)float[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Constant-folding:

0.0

Builder function:

nir_ssa_def *nir_fddy(nir_builder*, nir_ssa_def *src0)
fddx_fine(float[N] src0)float[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Constant-folding:

0.0

Builder function:

nir_ssa_def *nir_fddx_fine(nir_builder*, nir_ssa_def *src0)
fddy_fine(float[N] src0)float[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Constant-folding:

0.0

Builder function:

nir_ssa_def *nir_fddy_fine(nir_builder*, nir_ssa_def *src0)
fddx_coarse(float[N] src0)float[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Constant-folding:

0.0

Builder function:

nir_ssa_def *nir_fddx_coarse(nir_builder*, nir_ssa_def *src0)
fddy_coarse(float[N] src0)float[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Constant-folding:

0.0

Builder function:

nir_ssa_def *nir_fddy_coarse(nir_builder*, nir_ssa_def *src0)
pack_snorm_2x16(float32[2] src0)uint32[1]

Properties:

Per-component

Associative

2-src commutative

N

N

N

Constant-folding:

dst.x = (uint32_t) pack_snorm_1x16(src0.x);
dst.x |= ((uint32_t) pack_snorm_1x16(src0.y)) << 16;

Builder function:

nir_ssa_def *nir_pack_snorm_2x16(nir_builder*, nir_ssa_def *src0)
pack_snorm_4x8(float32[4] src0)uint32[1]

Properties:

Per-component

Associative

2-src commutative

N

N

N

Constant-folding:

dst.x = (uint32_t) pack_snorm_1x8(src0.x);
dst.x |= ((uint32_t) pack_snorm_1x8(src0.y)) << 8;
dst.x |= ((uint32_t) pack_snorm_1x8(src0.z)) << 16;
dst.x |= ((uint32_t) pack_snorm_1x8(src0.w)) << 24;

Builder function:

nir_ssa_def *nir_pack_snorm_4x8(nir_builder*, nir_ssa_def *src0)
pack_unorm_2x16(float32[2] src0)uint32[1]

Properties:

Per-component

Associative

2-src commutative

N

N

N

Constant-folding:

dst.x = (uint32_t) pack_unorm_1x16(src0.x);
dst.x |= ((uint32_t) pack_unorm_1x16(src0.y)) << 16;

Builder function:

nir_ssa_def *nir_pack_unorm_2x16(nir_builder*, nir_ssa_def *src0)
pack_unorm_4x8(float32[4] src0)uint32[1]

Properties:

Per-component

Associative

2-src commutative

N

N

N

Constant-folding:

dst.x = (uint32_t) pack_unorm_1x8(src0.x);
dst.x |= ((uint32_t) pack_unorm_1x8(src0.y)) << 8;
dst.x |= ((uint32_t) pack_unorm_1x8(src0.z)) << 16;
dst.x |= ((uint32_t) pack_unorm_1x8(src0.w)) << 24;

Builder function:

nir_ssa_def *nir_pack_unorm_4x8(nir_builder*, nir_ssa_def *src0)
pack_half_2x16(float32[2] src0)uint32[1]

Properties:

Per-component

Associative

2-src commutative

N

N

N

Constant-folding:

dst.x = (uint32_t) pack_half_1x16(src0.x);
dst.x |= ((uint32_t) pack_half_1x16(src0.y)) << 16;

Builder function:

nir_ssa_def *nir_pack_half_2x16(nir_builder*, nir_ssa_def *src0)
unpack_snorm_2x16(uint32[1] src0)float32[2]

Properties:

Per-component

Associative

2-src commutative

N

N

N

Constant-folding:

dst.x = unpack_snorm_1x16((uint16_t)(src0.x & 0xffff));
dst.y = unpack_snorm_1x16((uint16_t)(src0.x << 16));

Builder function:

nir_ssa_def *nir_unpack_snorm_2x16(nir_builder*, nir_ssa_def *src0)
unpack_snorm_4x8(uint32[1] src0)float32[4]

Properties:

Per-component

Associative

2-src commutative

N

N

N

Constant-folding:

dst.x = unpack_snorm_1x8((uint8_t)(src0.x & 0xff));
dst.y = unpack_snorm_1x8((uint8_t)((src0.x >> 8) & 0xff));
dst.z = unpack_snorm_1x8((uint8_t)((src0.x >> 16) & 0xff));
dst.w = unpack_snorm_1x8((uint8_t)(src0.x >> 24));

Builder function:

nir_ssa_def *nir_unpack_snorm_4x8(nir_builder*, nir_ssa_def *src0)
unpack_unorm_2x16(uint32[1] src0)float32[2]

Properties:

Per-component

Associative

2-src commutative

N

N

N

Constant-folding:

dst.x = unpack_unorm_1x16((uint16_t)(src0.x & 0xffff));
dst.y = unpack_unorm_1x16((uint16_t)(src0.x << 16));

Builder function:

nir_ssa_def *nir_unpack_unorm_2x16(nir_builder*, nir_ssa_def *src0)
unpack_unorm_4x8(uint32[1] src0)float32[4]

Properties:

Per-component

Associative

2-src commutative

N

N

N

Constant-folding:

dst.x = unpack_unorm_1x8((uint8_t)(src0.x & 0xff));
dst.y = unpack_unorm_1x8((uint8_t)((src0.x >> 8) & 0xff));
dst.z = unpack_unorm_1x8((uint8_t)((src0.x >> 16) & 0xff));
dst.w = unpack_unorm_1x8((uint8_t)(src0.x >> 24));

Builder function:

nir_ssa_def *nir_unpack_unorm_4x8(nir_builder*, nir_ssa_def *src0)
unpack_half_2x16(uint32[1] src0)float32[2]

Properties:

Per-component

Associative

2-src commutative

N

N

N

Constant-folding:

dst.x = unpack_half_1x16((uint16_t)(src0.x & 0xffff));
dst.y = unpack_half_1x16((uint16_t)(src0.x << 16));

Builder function:

nir_ssa_def *nir_unpack_half_2x16(nir_builder*, nir_ssa_def *src0)
pack_uvec2_to_uint(uint32[2] src0)uint32[1]

Properties:

Per-component

Associative

2-src commutative

N

N

N

Constant-folding:

dst.x = (src0.x & 0xffff) | (src0.y << 16);

Builder function:

nir_ssa_def *nir_pack_uvec2_to_uint(nir_builder*, nir_ssa_def *src0)
pack_uvec4_to_uint(uint32[4] src0)uint32[1]

Properties:

Per-component

Associative

2-src commutative

N

N

N

Constant-folding:

dst.x = (src0.x <<  0) |
        (src0.y <<  8) |
        (src0.z << 16) |
        (src0.w << 24);

Builder function:

nir_ssa_def *nir_pack_uvec4_to_uint(nir_builder*, nir_ssa_def *src0)
pack_32_4x8(uint8[4] src0)uint32[1]

Properties:

Per-component

Associative

2-src commutative

N

N

N

Constant-folding:

dst.x = src0.x | ((uint32_t)src0.y << 8) | ((uint32_t)src0.z << 16) | ((uint32_t)src0.w << 24);

Builder function:

nir_ssa_def *nir_pack_32_4x8(nir_builder*, nir_ssa_def *src0)
pack_32_2x16(uint16[2] src0)uint32[1]

Properties:

Per-component

Associative

2-src commutative

N

N

N

Constant-folding:

dst.x = src0.x | ((uint32_t)src0.y << 16);

Builder function:

nir_ssa_def *nir_pack_32_2x16(nir_builder*, nir_ssa_def *src0)
pack_64_2x32(uint32[2] src0)uint64[1]

Properties:

Per-component

Associative

2-src commutative

N

N

N

Constant-folding:

dst.x = src0.x | ((uint64_t)src0.y << 32);

Builder function:

nir_ssa_def *nir_pack_64_2x32(nir_builder*, nir_ssa_def *src0)
pack_64_4x16(uint16[4] src0)uint64[1]

Properties:

Per-component

Associative

2-src commutative

N

N

N

Constant-folding:

dst.x = src0.x | ((uint64_t)src0.y << 16) | ((uint64_t)src0.z << 32) | ((uint64_t)src0.w << 48);

Builder function:

nir_ssa_def *nir_pack_64_4x16(nir_builder*, nir_ssa_def *src0)
unpack_64_2x32(uint64[1] src0)uint32[2]

Properties:

Per-component

Associative

2-src commutative

N

N

N

Constant-folding:

dst.x = src0.x; dst.y = src0.x >> 32;

Builder function:

nir_ssa_def *nir_unpack_64_2x32(nir_builder*, nir_ssa_def *src0)
unpack_64_4x16(uint64[1] src0)uint16[4]

Properties:

Per-component

Associative

2-src commutative

N

N

N

Constant-folding:

dst.x = src0.x; dst.y = src0.x >> 16; dst.z = src0.x >> 32; dst.w = src0.w >> 48;

Builder function:

nir_ssa_def *nir_unpack_64_4x16(nir_builder*, nir_ssa_def *src0)
unpack_32_2x16(uint32[1] src0)uint16[2]

Properties:

Per-component

Associative

2-src commutative

N

N

N

Constant-folding:

dst.x = src0.x; dst.y = src0.x >> 16;

Builder function:

nir_ssa_def *nir_unpack_32_2x16(nir_builder*, nir_ssa_def *src0)
unpack_32_4x8(uint32[1] src0)uint8[4]

Properties:

Per-component

Associative

2-src commutative

N

N

N

Constant-folding:

dst.x = src0.x; dst.y = src0.x >> 8; dst.z = src0.x >> 16; dst.w = src0.x >> 24;

Builder function:

nir_ssa_def *nir_unpack_32_4x8(nir_builder*, nir_ssa_def *src0)
unpack_half_2x16_flush_to_zero(uint32[1] src0)float32[2]

Properties:

Per-component

Associative

2-src commutative

N

N

N

Constant-folding:

dst.x = unpack_half_1x16_flush_to_zero((uint16_t)(src0.x & 0xffff));
dst.y = unpack_half_1x16_flush_to_zero((uint16_t)(src0.x << 16));

Builder function:

nir_ssa_def *nir_unpack_half_2x16_flush_to_zero(nir_builder*, nir_ssa_def *src0)
unpack_half_2x16_split_x(uint32[N] src0)float32[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Constant-folding:

unpack_half_1x16((uint16_t)(src0 & 0xffff))

Builder function:

nir_ssa_def *nir_unpack_half_2x16_split_x(nir_builder*, nir_ssa_def *src0)
unpack_half_2x16_split_y(uint32[N] src0)float32[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Constant-folding:

unpack_half_1x16((uint16_t)(src0 >> 16))

Builder function:

nir_ssa_def *nir_unpack_half_2x16_split_y(nir_builder*, nir_ssa_def *src0)
unpack_half_2x16_split_x_flush_to_zero(uint32[N] src0)float32[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Constant-folding:

unpack_half_1x16_flush_to_zero((uint16_t)(src0 & 0xffff))

Builder function:

nir_ssa_def *nir_unpack_half_2x16_split_x_flush_to_zero(nir_builder*, nir_ssa_def *src0)
unpack_half_2x16_split_y_flush_to_zero(uint32[N] src0)float32[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Constant-folding:

unpack_half_1x16_flush_to_zero((uint16_t)(src0 >> 16))

Builder function:

nir_ssa_def *nir_unpack_half_2x16_split_y_flush_to_zero(nir_builder*, nir_ssa_def *src0)
unpack_32_2x16_split_x(uint32[N] src0)uint16[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Constant-folding:

src0

Builder function:

nir_ssa_def *nir_unpack_32_2x16_split_x(nir_builder*, nir_ssa_def *src0)
unpack_32_2x16_split_y(uint32[N] src0)uint16[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Constant-folding:

src0 >> 16

Builder function:

nir_ssa_def *nir_unpack_32_2x16_split_y(nir_builder*, nir_ssa_def *src0)
unpack_64_2x32_split_x(uint64[N] src0)uint32[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Constant-folding:

src0

Builder function:

nir_ssa_def *nir_unpack_64_2x32_split_x(nir_builder*, nir_ssa_def *src0)
unpack_64_2x32_split_y(uint64[N] src0)uint32[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Constant-folding:

src0 >> 32

Builder function:

nir_ssa_def *nir_unpack_64_2x32_split_y(nir_builder*, nir_ssa_def *src0)
bitfield_reverse(uint32[N] src0)uint32[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Constant-folding:

/* we're not winning any awards for speed here, but that's ok */
dst = 0;
for (unsigned bit = 0; bit < 32; bit++)
   dst |= ((src0 >> bit) & 1) << (31 - bit);

Builder function:

nir_ssa_def *nir_bitfield_reverse(nir_builder*, nir_ssa_def *src0)
bit_count(uint[N] src0)uint32[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Constant-folding:

dst = 0;
for (unsigned bit = 0; bit < bit_size; bit++) {
   if ((src0 >> bit) & 1)
      dst++;
}

Builder function:

nir_ssa_def *nir_bit_count(nir_builder*, nir_ssa_def *src0)
ufind_msb(uint[N] src0)int32[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Constant-folding:

dst = -1;
for (int bit = bit_size - 1; bit >= 0; bit--) {
   if ((src0 >> bit) & 1) {
      dst = bit;
      break;
   }
}

Builder function:

nir_ssa_def *nir_ufind_msb(nir_builder*, nir_ssa_def *src0)
ufind_msb_rev(uint[N] src0)int32[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Constant-folding:

dst = -1;
for (int bit = 0; bit < bit_size; bit++) {
   if ((src0 << bit) & 0x80000000) {
      dst = bit;
      break;
   }
}

Builder function:

nir_ssa_def *nir_ufind_msb_rev(nir_builder*, nir_ssa_def *src0)
uclz(uint32[N] src0)uint32[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Constant-folding:

int bit;
for (bit = bit_size - 1; bit >= 0; bit--) {
   if ((src0 & (1u << bit)) != 0)
      break;
}
dst = (unsigned)(31 - bit);

Builder function:

nir_ssa_def *nir_uclz(nir_builder*, nir_ssa_def *src0)
ifind_msb(int32[N] src0)int32[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Constant-folding:

dst = -1;
for (int bit = 31; bit >= 0; bit--) {
   /* If src0 < 0, we're looking for the first 0 bit.
    * if src0 >= 0, we're looking for the first 1 bit.
    */
   if ((((src0 >> bit) & 1) && (src0 >= 0)) ||
      (!((src0 >> bit) & 1) && (src0 < 0))) {
      dst = bit;
      break;
   }
}

Builder function:

nir_ssa_def *nir_ifind_msb(nir_builder*, nir_ssa_def *src0)
ifind_msb_rev(int[N] src0)int32[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Constant-folding:

dst = -1;
if (src0 != 0 && src0 != -1) {
   for (int bit = 0; bit < 31; bit++) {
      /* If src0 < 0, we're looking for the first 0 bit.
       * if src0 >= 0, we're looking for the first 1 bit.
       */
      if ((((src0 << bit) & 0x40000000) && (src0 >= 0)) ||
          ((!((src0 << bit) & 0x40000000)) && (src0 < 0))) {
         dst = bit;
         break;
      }
   }
}

Builder function:

nir_ssa_def *nir_ifind_msb_rev(nir_builder*, nir_ssa_def *src0)
find_lsb(int[N] src0)int32[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Constant-folding:

dst = -1;
for (unsigned bit = 0; bit < bit_size; bit++) {
   if ((src0 >> bit) & 1) {
      dst = bit;
      break;
   }
}

Builder function:

nir_ssa_def *nir_find_lsb(nir_builder*, nir_ssa_def *src0)
cube_face_coord_amd(float32[3] src0)float32[2]

Properties:

Per-component

Associative

2-src commutative

N

N

N

Constant-folding:

dst.x = dst.y = 0.0;
float absX = fabsf(src0.x);
float absY = fabsf(src0.y);
float absZ = fabsf(src0.z);

float ma = 0.0;
if (absX >= absY && absX >= absZ) { ma = 2 * src0.x; }
if (absY >= absX && absY >= absZ) { ma = 2 * src0.y; }
if (absZ >= absX && absZ >= absY) { ma = 2 * src0.z; }

if (src0.x >= 0 && absX >= absY && absX >= absZ) { dst.x = -src0.z; dst.y = -src0.y; }
if (src0.x < 0 && absX >= absY && absX >= absZ) { dst.x = src0.z; dst.y = -src0.y; }
if (src0.y >= 0 && absY >= absX && absY >= absZ) { dst.x = src0.x; dst.y = src0.z; }
if (src0.y < 0 && absY >= absX && absY >= absZ) { dst.x = src0.x; dst.y = -src0.z; }
if (src0.z >= 0 && absZ >= absX && absZ >= absY) { dst.x = src0.x; dst.y = -src0.y; }
if (src0.z < 0 && absZ >= absX && absZ >= absY) { dst.x = -src0.x; dst.y = -src0.y; }

dst.x = dst.x * (1.0f / ma) + 0.5f;
dst.y = dst.y * (1.0f / ma) + 0.5f;

Builder function:

nir_ssa_def *nir_cube_face_coord_amd(nir_builder*, nir_ssa_def *src0)
cube_face_index_amd(float32[3] src0)float32[1]

Properties:

Per-component

Associative

2-src commutative

N

N

N

Constant-folding:

dst.x = 0.0;
float absX = fabsf(src0.x);
float absY = fabsf(src0.y);
float absZ = fabsf(src0.z);
if (src0.x >= 0 && absX >= absY && absX >= absZ) dst.x = 0;
if (src0.x < 0 && absX >= absY && absX >= absZ) dst.x = 1;
if (src0.y >= 0 && absY >= absX && absY >= absZ) dst.x = 2;
if (src0.y < 0 && absY >= absX && absY >= absZ) dst.x = 3;
if (src0.z >= 0 && absZ >= absX && absZ >= absY) dst.x = 4;
if (src0.z < 0 && absZ >= absX && absZ >= absY) dst.x = 5;

Builder function:

nir_ssa_def *nir_cube_face_index_amd(nir_builder*, nir_ssa_def *src0)
fsum2(float[2] src0)float[1]

Properties:

Per-component

Associative

2-src commutative

N

N

N

Constant-folding:

((src0.x) + (src0.y))

Builder function:

nir_ssa_def *nir_fsum2(nir_builder*, nir_ssa_def *src0)
fsum3(float[3] src0)float[1]

Properties:

Per-component

Associative

2-src commutative

N

N

N

Constant-folding:

((src0.x) + (src0.y) + (src0.z))

Builder function:

nir_ssa_def *nir_fsum3(nir_builder*, nir_ssa_def *src0)
fsum4(float[4] src0)float[1]

Properties:

Per-component

Associative

2-src commutative

N

N

N

Constant-folding:

((src0.x) + (src0.y) + (src0.z) + (src0.w))

Builder function:

nir_ssa_def *nir_fsum4(nir_builder*, nir_ssa_def *src0)
fadd(float[N] src0, float[N] src1)float[N]

Properties:

Per-component

Associative

2-src commutative

Y

Y

Y

Constant-folding:

if (nir_is_rounding_mode_rtz(execution_mode, bit_size)) {
   if (bit_size == 64)
      dst = _mesa_double_add_rtz(src0, src1);
   else
      dst = _mesa_double_to_float_rtz((double)src0 + (double)src1);
} else {
   dst = src0 + src1;
}

Builder function:

nir_ssa_def *nir_fadd(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1)
iadd(int[N] src0, int[N] src1)int[N]

Properties:

Per-component

Associative

2-src commutative

Y

Y

Y

Constant-folding:

(uint64_t)src0 + (uint64_t)src1

Builder function:

nir_ssa_def *nir_iadd(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1)
iadd_sat(int[N] src0, int[N] src1)int[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

Y

Constant-folding:

src1 > 0 ?
   (src0 + src1 < src0 ? u_intN_max(bit_size) : src0 + src1) :
   (src0 < src0 + src1 ? u_intN_min(bit_size) : src0 + src1)

Builder function:

nir_ssa_def *nir_iadd_sat(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1)
uadd_sat(uint[N] src0, uint[N] src1)uint[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

Y

Constant-folding:

(src0 + src1) < src0 ? u_uintN_max(sizeof(src0) * 8) : (src0 + src1)

Builder function:

nir_ssa_def *nir_uadd_sat(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1)
isub_sat(int[N] src0, int[N] src1)int[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Constant-folding:

src1 < 0 ?
   (src0 - src1 < src0 ? u_intN_max(bit_size) : src0 - src1) :
   (src0 < src0 - src1 ? u_intN_min(bit_size) : src0 - src1)

Builder function:

nir_ssa_def *nir_isub_sat(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1)
usub_sat(uint[N] src0, uint[N] src1)uint[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Constant-folding:

src0 < src1 ? 0 : src0 - src1

Builder function:

nir_ssa_def *nir_usub_sat(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1)
fsub(float[N] src0, float[N] src1)float[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Constant-folding:

if (nir_is_rounding_mode_rtz(execution_mode, bit_size)) {
   if (bit_size == 64)
      dst = _mesa_double_sub_rtz(src0, src1);
   else
      dst = _mesa_double_to_float_rtz((double)src0 - (double)src1);
} else {
   dst = src0 - src1;
}

Builder function:

nir_ssa_def *nir_fsub(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1)
isub(int[N] src0, int[N] src1)int[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Constant-folding:

src0 - src1

Builder function:

nir_ssa_def *nir_isub(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1)
uabs_isub(int[N] src0, int[N] src1)uint[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Constant-folding:

src1 > src0 ? (uint64_t) src1 - (uint64_t) src0
            : (uint64_t) src0 - (uint64_t) src1

Builder function:

nir_ssa_def *nir_uabs_isub(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1)
uabs_usub(uint[N] src0, uint[N] src1)uint[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Constant-folding:

(src1 > src0) ? (src1 - src0) : (src0 - src1)

Builder function:

nir_ssa_def *nir_uabs_usub(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1)
fmul(float[N] src0, float[N] src1)float[N]

Properties:

Per-component

Associative

2-src commutative

Y

Y

Y

Constant-folding:

if (nir_is_rounding_mode_rtz(execution_mode, bit_size)) {
   if (bit_size == 64)
      dst = _mesa_double_mul_rtz(src0, src1);
   else
      dst = _mesa_double_to_float_rtz((double)src0 * (double)src1);
} else {
   dst = src0 * src1;
}

Builder function:

nir_ssa_def *nir_fmul(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1)
imul(int[N] src0, int[N] src1)int[N]

Properties:

Per-component

Associative

2-src commutative

Y

Y

Y

Constant-folding:

/* Use 64-bit multiplies to prevent overflow of signed arithmetic */
dst = (uint64_t)src0 * (uint64_t)src1;

Builder function:

nir_ssa_def *nir_imul(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1)
imul_2x32_64(int32[N] src0, int32[N] src1)int64[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

Y

Constant-folding:

(int64_t)src0 * (int64_t)src1

Builder function:

nir_ssa_def *nir_imul_2x32_64(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1)
umul_2x32_64(uint32[N] src0, uint32[N] src1)uint64[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

Y

Constant-folding:

(uint64_t)src0 * (uint64_t)src1

Builder function:

nir_ssa_def *nir_umul_2x32_64(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1)
imul_high(int[N] src0, int[N] src1)int[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

Y

Constant-folding:

if (bit_size == 64) {
   /* We need to do a full 128-bit x 128-bit multiply in order for the sign
    * extension to work properly.  The casts are kind-of annoying but needed
    * to prevent compiler warnings.
    */
   uint32_t src0_u32[4] = {
      src0,
      (int64_t)src0 >> 32,
      (int64_t)src0 >> 63,
      (int64_t)src0 >> 63,
   };
   uint32_t src1_u32[4] = {
      src1,
      (int64_t)src1 >> 32,
      (int64_t)src1 >> 63,
      (int64_t)src1 >> 63,
   };
   uint32_t prod_u32[4];
   ubm_mul_u32arr(prod_u32, src0_u32, src1_u32);
   dst = (uint64_t)prod_u32[2] | ((uint64_t)prod_u32[3] << 32);
} else {
   /* First, sign-extend to 64-bit, then convert to unsigned to prevent
    * potential overflow of signed multiply */
   dst = ((uint64_t)(int64_t)src0 * (uint64_t)(int64_t)src1) >> bit_size;
}

Builder function:

nir_ssa_def *nir_imul_high(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1)
umul_high(uint[N] src0, uint[N] src1)uint[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

Y

Constant-folding:

if (bit_size == 64) {
   /* The casts are kind-of annoying but needed to prevent compiler warnings. */
   uint32_t src0_u32[2] = { src0, (uint64_t)src0 >> 32 };
   uint32_t src1_u32[2] = { src1, (uint64_t)src1 >> 32 };
   uint32_t prod_u32[4];
   ubm_mul_u32arr(prod_u32, src0_u32, src1_u32);
   dst = (uint64_t)prod_u32[2] | ((uint64_t)prod_u32[3] << 32);
} else {
   dst = ((uint64_t)src0 * (uint64_t)src1) >> bit_size;
}

Builder function:

nir_ssa_def *nir_umul_high(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1)
umul_low(uint32[N] src0, uint32[N] src1)uint32[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

Y

Constant-folding:

uint64_t mask = (1 << (bit_size / 2)) - 1;
dst = ((uint64_t)src0 & mask) * ((uint64_t)src1 & mask);

Builder function:

nir_ssa_def *nir_umul_low(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1)
imul_32x16(int32[N] src0, int32[N] src1)int32[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Constant-folding:

src0 * (int16_t) src1

Builder function:

nir_ssa_def *nir_imul_32x16(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1)
umul_32x16(uint32[N] src0, uint32[N] src1)uint32[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Constant-folding:

src0 * (uint16_t) src1

Builder function:

nir_ssa_def *nir_umul_32x16(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1)
fdiv(float[N] src0, float[N] src1)float[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Constant-folding:

src0 / src1

Builder function:

nir_ssa_def *nir_fdiv(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1)
idiv(int[N] src0, int[N] src1)int[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Constant-folding:

src1 == 0 ? 0 : (src0 / src1)

Builder function:

nir_ssa_def *nir_idiv(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1)
udiv(uint[N] src0, uint[N] src1)uint[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Constant-folding:

src1 == 0 ? 0 : (src0 / src1)

Builder function:

nir_ssa_def *nir_udiv(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1)
uadd_carry(uint[N] src0, uint[N] src1)uint[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

Y

Constant-folding:

src0 + src1 < src0

Builder function:

nir_ssa_def *nir_uadd_carry(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1)
usub_borrow(uint[N] src0, uint[N] src1)uint[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Constant-folding:

src0 < src1

Builder function:

nir_ssa_def *nir_usub_borrow(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1)
ihadd(int[N] src0, int[N] src1)int[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

Y

Constant-folding:

(src0 & src1) + ((src0 ^ src1) >> 1)

Builder function:

nir_ssa_def *nir_ihadd(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1)
uhadd(uint[N] src0, uint[N] src1)uint[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

Y

Constant-folding:

(src0 & src1) + ((src0 ^ src1) >> 1)

Builder function:

nir_ssa_def *nir_uhadd(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1)
irhadd(int[N] src0, int[N] src1)int[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

Y

Constant-folding:

(src0 | src1) - ((src0 ^ src1) >> 1)

Builder function:

nir_ssa_def *nir_irhadd(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1)
urhadd(uint[N] src0, uint[N] src1)uint[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

Y

Constant-folding:

(src0 | src1) - ((src0 ^ src1) >> 1)

Builder function:

nir_ssa_def *nir_urhadd(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1)
umod(uint[N] src0, uint[N] src1)uint[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Constant-folding:

src1 == 0 ? 0 : src0 % src1

Builder function:

nir_ssa_def *nir_umod(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1)
irem(int[N] src0, int[N] src1)int[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Constant-folding:

src1 == 0 ? 0 : src0 % src1

Builder function:

nir_ssa_def *nir_irem(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1)
imod(int[N] src0, int[N] src1)int[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Constant-folding:

src1 == 0 ? 0 : ((src0 % src1 == 0 || (src0 >= 0) == (src1 >= 0)) ?                 src0 % src1 : src0 % src1 + src1)

Builder function:

nir_ssa_def *nir_imod(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1)
fmod(float[N] src0, float[N] src1)float[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Constant-folding:

src0 - src1 * floorf(src0 / src1)

Builder function:

nir_ssa_def *nir_fmod(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1)
frem(float[N] src0, float[N] src1)float[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Constant-folding:

src0 - src1 * truncf(src0 / src1)

Builder function:

nir_ssa_def *nir_frem(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1)
flt(float[N] src0, float[N] src1)bool1[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Constant-folding:

src0 < src1

Builder function:

nir_ssa_def *nir_flt(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1)
flt8(float[N] src0, float[N] src1)bool8[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Constant-folding:

src0 < src1

Builder function:

nir_ssa_def *nir_flt8(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1)
flt16(float[N] src0, float[N] src1)bool16[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Constant-folding:

src0 < src1

Builder function:

nir_ssa_def *nir_flt16(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1)
flt32(float[N] src0, float[N] src1)bool32[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Constant-folding:

src0 < src1

Builder function:

nir_ssa_def *nir_flt32(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1)
fge(float[N] src0, float[N] src1)bool1[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Constant-folding:

src0 >= src1

Builder function:

nir_ssa_def *nir_fge(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1)
fge8(float[N] src0, float[N] src1)bool8[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Constant-folding:

src0 >= src1

Builder function:

nir_ssa_def *nir_fge8(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1)
fge16(float[N] src0, float[N] src1)bool16[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Constant-folding:

src0 >= src1

Builder function:

nir_ssa_def *nir_fge16(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1)
fge32(float[N] src0, float[N] src1)bool32[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Constant-folding:

src0 >= src1

Builder function:

nir_ssa_def *nir_fge32(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1)
feq(float[N] src0, float[N] src1)bool1[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

Y

Constant-folding:

src0 == src1

Builder function:

nir_ssa_def *nir_feq(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1)
feq8(float[N] src0, float[N] src1)bool8[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

Y

Constant-folding:

src0 == src1

Builder function:

nir_ssa_def *nir_feq8(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1)
feq16(float[N] src0, float[N] src1)bool16[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

Y

Constant-folding:

src0 == src1

Builder function:

nir_ssa_def *nir_feq16(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1)
feq32(float[N] src0, float[N] src1)bool32[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

Y

Constant-folding:

src0 == src1

Builder function:

nir_ssa_def *nir_feq32(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1)
fneu(float[N] src0, float[N] src1)bool1[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

Y

Constant-folding:

src0 != src1

Builder function:

nir_ssa_def *nir_fneu(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1)
fneu8(float[N] src0, float[N] src1)bool8[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

Y

Constant-folding:

src0 != src1

Builder function:

nir_ssa_def *nir_fneu8(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1)
fneu16(float[N] src0, float[N] src1)bool16[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

Y

Constant-folding:

src0 != src1

Builder function:

nir_ssa_def *nir_fneu16(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1)
fneu32(float[N] src0, float[N] src1)bool32[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

Y

Constant-folding:

src0 != src1

Builder function:

nir_ssa_def *nir_fneu32(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1)
ilt(int[N] src0, int[N] src1)bool1[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Constant-folding:

src0 < src1

Builder function:

nir_ssa_def *nir_ilt(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1)
ilt8(int[N] src0, int[N] src1)bool8[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Constant-folding:

src0 < src1

Builder function:

nir_ssa_def *nir_ilt8(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1)
ilt16(int[N] src0, int[N] src1)bool16[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Constant-folding:

src0 < src1

Builder function:

nir_ssa_def *nir_ilt16(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1)
ilt32(int[N] src0, int[N] src1)bool32[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Constant-folding:

src0 < src1

Builder function:

nir_ssa_def *nir_ilt32(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1)
ige(int[N] src0, int[N] src1)bool1[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Constant-folding:

src0 >= src1

Builder function:

nir_ssa_def *nir_ige(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1)
ige8(int[N] src0, int[N] src1)bool8[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Constant-folding:

src0 >= src1

Builder function:

nir_ssa_def *nir_ige8(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1)
ige16(int[N] src0, int[N] src1)bool16[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Constant-folding:

src0 >= src1

Builder function:

nir_ssa_def *nir_ige16(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1)
ige32(int[N] src0, int[N] src1)bool32[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Constant-folding:

src0 >= src1

Builder function:

nir_ssa_def *nir_ige32(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1)
ieq(int[N] src0, int[N] src1)bool1[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

Y

Constant-folding:

src0 == src1

Builder function:

nir_ssa_def *nir_ieq(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1)
ieq8(int[N] src0, int[N] src1)bool8[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

Y

Constant-folding:

src0 == src1

Builder function:

nir_ssa_def *nir_ieq8(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1)
ieq16(int[N] src0, int[N] src1)bool16[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

Y

Constant-folding:

src0 == src1

Builder function:

nir_ssa_def *nir_ieq16(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1)
ieq32(int[N] src0, int[N] src1)bool32[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

Y

Constant-folding:

src0 == src1

Builder function:

nir_ssa_def *nir_ieq32(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1)
ine(int[N] src0, int[N] src1)bool1[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

Y

Constant-folding:

src0 != src1

Builder function:

nir_ssa_def *nir_ine(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1)
ine8(int[N] src0, int[N] src1)bool8[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

Y

Constant-folding:

src0 != src1

Builder function:

nir_ssa_def *nir_ine8(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1)
ine16(int[N] src0, int[N] src1)bool16[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

Y

Constant-folding:

src0 != src1

Builder function:

nir_ssa_def *nir_ine16(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1)
ine32(int[N] src0, int[N] src1)bool32[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

Y

Constant-folding:

src0 != src1

Builder function:

nir_ssa_def *nir_ine32(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1)
ult(uint[N] src0, uint[N] src1)bool1[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Constant-folding:

src0 < src1

Builder function:

nir_ssa_def *nir_ult(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1)
ult8(uint[N] src0, uint[N] src1)bool8[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Constant-folding:

src0 < src1

Builder function:

nir_ssa_def *nir_ult8(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1)
ult16(uint[N] src0, uint[N] src1)bool16[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Constant-folding:

src0 < src1

Builder function:

nir_ssa_def *nir_ult16(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1)
ult32(uint[N] src0, uint[N] src1)bool32[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Constant-folding:

src0 < src1

Builder function:

nir_ssa_def *nir_ult32(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1)
uge(uint[N] src0, uint[N] src1)bool1[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Constant-folding:

src0 >= src1

Builder function:

nir_ssa_def *nir_uge(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1)
uge8(uint[N] src0, uint[N] src1)bool8[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Constant-folding:

src0 >= src1

Builder function:

nir_ssa_def *nir_uge8(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1)
uge16(uint[N] src0, uint[N] src1)bool16[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Constant-folding:

src0 >= src1

Builder function:

nir_ssa_def *nir_uge16(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1)
uge32(uint[N] src0, uint[N] src1)bool32[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Constant-folding:

src0 >= src1

Builder function:

nir_ssa_def *nir_uge32(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1)
ball_fequal2(float[2] src0, float[2] src1)bool1[1]

Properties:

Per-component

Associative

2-src commutative

N

N

Y

Constant-folding:

((src0.y == src1.y) && (src0.x == src1.x))

Builder function:

nir_ssa_def *nir_ball_fequal2(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1)
ball_fequal4(float[4] src0, float[4] src1)bool1[1]

Properties:

Per-component

Associative

2-src commutative

N

N

Y

Constant-folding:

((src0.w == src1.w) && (src0.z == src1.z) && (src0.y == src1.y) && (src0.x == src1.x))

Builder function:

nir_ssa_def *nir_ball_fequal4(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1)
ball_fequal8(float[8] src0, float[8] src1)bool1[1]

Properties:

Per-component

Associative

2-src commutative

N

N

Y

Constant-folding:

((src0.h == src1.h) && (src0.g == src1.g) && (src0.f == src1.f) && (src0.e == src1.e) && (src0.w == src1.w) && (src0.z == src1.z) && (src0.y == src1.y) && (src0.x == src1.x))

Builder function:

nir_ssa_def *nir_ball_fequal8(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1)
ball_fequal16(float[16] src0, float[16] src1)bool1[1]

Properties:

Per-component

Associative

2-src commutative

N

N

Y

Constant-folding:

((src0.p == src1.p) && (src0.o == src1.o) && (src0.n == src1.n) && (src0.m == src1.m) && (src0.l == src1.l) && (src0.k == src1.k) && (src0.j == src1.j) && (src0.i == src1.i) && (src0.h == src1.h) && (src0.g == src1.g) && (src0.f == src1.f) && (src0.e == src1.e) && (src0.w == src1.w) && (src0.z == src1.z) && (src0.y == src1.y) && (src0.x == src1.x))

Builder function:

nir_ssa_def *nir_ball_fequal16(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1)
ball_fequal3(float[3] src0, float[3] src1)bool1[1]

Properties:

Per-component

Associative

2-src commutative

N

N

Y

Constant-folding:

((src0.z == src1.z) && (src0.y == src1.y) && (src0.x == src1.x))

Builder function:

nir_ssa_def *nir_ball_fequal3(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1)
ball_fequal5(float[5] src0, float[5] src1)bool1[1]

Properties:

Per-component

Associative

2-src commutative

N

N

Y

Constant-folding:

((src0.e == src1.e) && (src0.w == src1.w) && (src0.z == src1.z) && (src0.y == src1.y) && (src0.x == src1.x))

Builder function:

nir_ssa_def *nir_ball_fequal5(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1)
b8all_fequal2(float[2] src0, float[2] src1)bool8[1]

Properties:

Per-component

Associative

2-src commutative

N

N

Y

Constant-folding:

((src0.y == src1.y) && (src0.x == src1.x))

Builder function:

nir_ssa_def *nir_b8all_fequal2(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1)
b8all_fequal4(float[4] src0, float[4] src1)bool8[1]

Properties:

Per-component

Associative

2-src commutative

N

N

Y

Constant-folding:

((src0.w == src1.w) && (src0.z == src1.z) && (src0.y == src1.y) && (src0.x == src1.x))

Builder function:

nir_ssa_def *nir_b8all_fequal4(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1)
b8all_fequal8(float[8] src0, float[8] src1)bool8[1]

Properties:

Per-component

Associative

2-src commutative

N

N

Y

Constant-folding:

((src0.h == src1.h) && (src0.g == src1.g) && (src0.f == src1.f) && (src0.e == src1.e) && (src0.w == src1.w) && (src0.z == src1.z) && (src0.y == src1.y) && (src0.x == src1.x))

Builder function:

nir_ssa_def *nir_b8all_fequal8(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1)
b8all_fequal16(float[16] src0, float[16] src1)bool8[1]

Properties:

Per-component

Associative

2-src commutative

N

N

Y

Constant-folding:

((src0.p == src1.p) && (src0.o == src1.o) && (src0.n == src1.n) && (src0.m == src1.m) && (src0.l == src1.l) && (src0.k == src1.k) && (src0.j == src1.j) && (src0.i == src1.i) && (src0.h == src1.h) && (src0.g == src1.g) && (src0.f == src1.f) && (src0.e == src1.e) && (src0.w == src1.w) && (src0.z == src1.z) && (src0.y == src1.y) && (src0.x == src1.x))

Builder function:

nir_ssa_def *nir_b8all_fequal16(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1)
b8all_fequal3(float[3] src0, float[3] src1)bool8[1]

Properties:

Per-component

Associative

2-src commutative

N

N

Y

Constant-folding:

((src0.z == src1.z) && (src0.y == src1.y) && (src0.x == src1.x))

Builder function:

nir_ssa_def *nir_b8all_fequal3(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1)
b8all_fequal5(float[5] src0, float[5] src1)bool8[1]

Properties:

Per-component

Associative

2-src commutative

N

N

Y

Constant-folding:

((src0.e == src1.e) && (src0.w == src1.w) && (src0.z == src1.z) && (src0.y == src1.y) && (src0.x == src1.x))

Builder function:

nir_ssa_def *nir_b8all_fequal5(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1)
b16all_fequal2(float[2] src0, float[2] src1)bool16[1]

Properties:

Per-component

Associative

2-src commutative

N

N

Y

Constant-folding:

((src0.y == src1.y) && (src0.x == src1.x))

Builder function:

nir_ssa_def *nir_b16all_fequal2(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1)
b16all_fequal4(float[4] src0, float[4] src1)bool16[1]

Properties:

Per-component

Associative

2-src commutative

N

N

Y

Constant-folding:

((src0.w == src1.w) && (src0.z == src1.z) && (src0.y == src1.y) && (src0.x == src1.x))

Builder function:

nir_ssa_def *nir_b16all_fequal4(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1)
b16all_fequal8(float[8] src0, float[8] src1)bool16[1]

Properties:

Per-component

Associative

2-src commutative

N

N

Y

Constant-folding:

((src0.h == src1.h) && (src0.g == src1.g) && (src0.f == src1.f) && (src0.e == src1.e) && (src0.w == src1.w) && (src0.z == src1.z) && (src0.y == src1.y) && (src0.x == src1.x))

Builder function:

nir_ssa_def *nir_b16all_fequal8(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1)
b16all_fequal16(float[16] src0, float[16] src1)bool16[1]

Properties:

Per-component

Associative

2-src commutative

N

N

Y

Constant-folding:

((src0.p == src1.p) && (src0.o == src1.o) && (src0.n == src1.n) && (src0.m == src1.m) && (src0.l == src1.l) && (src0.k == src1.k) && (src0.j == src1.j) && (src0.i == src1.i) && (src0.h == src1.h) && (src0.g == src1.g) && (src0.f == src1.f) && (src0.e == src1.e) && (src0.w == src1.w) && (src0.z == src1.z) && (src0.y == src1.y) && (src0.x == src1.x))

Builder function:

nir_ssa_def *nir_b16all_fequal16(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1)
b16all_fequal3(float[3] src0, float[3] src1)bool16[1]

Properties:

Per-component

Associative

2-src commutative

N

N

Y

Constant-folding:

((src0.z == src1.z) && (src0.y == src1.y) && (src0.x == src1.x))

Builder function:

nir_ssa_def *nir_b16all_fequal3(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1)
b16all_fequal5(float[5] src0, float[5] src1)bool16[1]

Properties:

Per-component

Associative

2-src commutative

N

N

Y

Constant-folding:

((src0.e == src1.e) && (src0.w == src1.w) && (src0.z == src1.z) && (src0.y == src1.y) && (src0.x == src1.x))

Builder function:

nir_ssa_def *nir_b16all_fequal5(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1)
b32all_fequal2(float[2] src0, float[2] src1)bool32[1]

Properties:

Per-component

Associative

2-src commutative

N

N

Y

Constant-folding:

((src0.y == src1.y) && (src0.x == src1.x))

Builder function:

nir_ssa_def *nir_b32all_fequal2(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1)
b32all_fequal4(float[4] src0, float[4] src1)bool32[1]

Properties:

Per-component

Associative

2-src commutative

N

N

Y

Constant-folding:

((src0.w == src1.w) && (src0.z == src1.z) && (src0.y == src1.y) && (src0.x == src1.x))

Builder function:

nir_ssa_def *nir_b32all_fequal4(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1)
b32all_fequal8(float[8] src0, float[8] src1)bool32[1]

Properties:

Per-component

Associative

2-src commutative

N

N

Y

Constant-folding:

((src0.h == src1.h) && (src0.g == src1.g) && (src0.f == src1.f) && (src0.e == src1.e) && (src0.w == src1.w) && (src0.z == src1.z) && (src0.y == src1.y) && (src0.x == src1.x))

Builder function:

nir_ssa_def *nir_b32all_fequal8(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1)
b32all_fequal16(float[16] src0, float[16] src1)bool32[1]

Properties:

Per-component

Associative

2-src commutative

N

N

Y

Constant-folding:

((src0.p == src1.p) && (src0.o == src1.o) && (src0.n == src1.n) && (src0.m == src1.m) && (src0.l == src1.l) && (src0.k == src1.k) && (src0.j == src1.j) && (src0.i == src1.i) && (src0.h == src1.h) && (src0.g == src1.g) && (src0.f == src1.f) && (src0.e == src1.e) && (src0.w == src1.w) && (src0.z == src1.z) && (src0.y == src1.y) && (src0.x == src1.x))

Builder function:

nir_ssa_def *nir_b32all_fequal16(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1)
b32all_fequal3(float[3] src0, float[3] src1)bool32[1]

Properties:

Per-component

Associative

2-src commutative

N

N

Y

Constant-folding:

((src0.z == src1.z) && (src0.y == src1.y) && (src0.x == src1.x))

Builder function:

nir_ssa_def *nir_b32all_fequal3(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1)
b32all_fequal5(float[5] src0, float[5] src1)bool32[1]

Properties:

Per-component

Associative

2-src commutative

N

N

Y

Constant-folding:

((src0.e == src1.e) && (src0.w == src1.w) && (src0.z == src1.z) && (src0.y == src1.y) && (src0.x == src1.x))

Builder function:

nir_ssa_def *nir_b32all_fequal5(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1)
bany_fnequal2(float[2] src0, float[2] src1)bool1[1]

Properties:

Per-component

Associative

2-src commutative

N

N

Y

Constant-folding:

((src0.y != src1.y) || (src0.x != src1.x))

Builder function:

nir_ssa_def *nir_bany_fnequal2(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1)
bany_fnequal4(float[4] src0, float[4] src1)bool1[1]

Properties:

Per-component

Associative

2-src commutative

N

N

Y

Constant-folding:

((src0.w != src1.w) || (src0.z != src1.z) || (src0.y != src1.y) || (src0.x != src1.x))

Builder function:

nir_ssa_def *nir_bany_fnequal4(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1)
bany_fnequal8(float[8] src0, float[8] src1)bool1[1]

Properties:

Per-component

Associative

2-src commutative

N

N

Y

Constant-folding:

((src0.h != src1.h) || (src0.g != src1.g) || (src0.f != src1.f) || (src0.e != src1.e) || (src0.w != src1.w) || (src0.z != src1.z) || (src0.y != src1.y) || (src0.x != src1.x))

Builder function:

nir_ssa_def *nir_bany_fnequal8(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1)
bany_fnequal16(float[16] src0, float[16] src1)bool1[1]

Properties:

Per-component

Associative

2-src commutative

N

N

Y

Constant-folding:

((src0.p != src1.p) || (src0.o != src1.o) || (src0.n != src1.n) || (src0.m != src1.m) || (src0.l != src1.l) || (src0.k != src1.k) || (src0.j != src1.j) || (src0.i != src1.i) || (src0.h != src1.h) || (src0.g != src1.g) || (src0.f != src1.f) || (src0.e != src1.e) || (src0.w != src1.w) || (src0.z != src1.z) || (src0.y != src1.y) || (src0.x != src1.x))

Builder function:

nir_ssa_def *nir_bany_fnequal16(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1)
bany_fnequal3(float[3] src0, float[3] src1)bool1[1]

Properties:

Per-component

Associative

2-src commutative

N

N

Y

Constant-folding:

((src0.z != src1.z) || (src0.y != src1.y) || (src0.x != src1.x))

Builder function:

nir_ssa_def *nir_bany_fnequal3(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1)
bany_fnequal5(float[5] src0, float[5] src1)bool1[1]

Properties:

Per-component

Associative

2-src commutative

N

N

Y

Constant-folding:

((src0.e != src1.e) || (src0.w != src1.w) || (src0.z != src1.z) || (src0.y != src1.y) || (src0.x != src1.x))

Builder function:

nir_ssa_def *nir_bany_fnequal5(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1)
b8any_fnequal2(float[2] src0, float[2] src1)bool8[1]

Properties:

Per-component

Associative

2-src commutative

N

N

Y

Constant-folding:

((src0.y != src1.y) || (src0.x != src1.x))

Builder function:

nir_ssa_def *nir_b8any_fnequal2(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1)
b8any_fnequal4(float[4] src0, float[4] src1)bool8[1]

Properties:

Per-component

Associative

2-src commutative

N

N

Y

Constant-folding:

((src0.w != src1.w) || (src0.z != src1.z) || (src0.y != src1.y) || (src0.x != src1.x))

Builder function:

nir_ssa_def *nir_b8any_fnequal4(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1)
b8any_fnequal8(float[8] src0, float[8] src1)bool8[1]

Properties:

Per-component

Associative

2-src commutative

N

N

Y

Constant-folding:

((src0.h != src1.h) || (src0.g != src1.g) || (src0.f != src1.f) || (src0.e != src1.e) || (src0.w != src1.w) || (src0.z != src1.z) || (src0.y != src1.y) || (src0.x != src1.x))

Builder function:

nir_ssa_def *nir_b8any_fnequal8(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1)
b8any_fnequal16(float[16] src0, float[16] src1)bool8[1]

Properties:

Per-component

Associative

2-src commutative

N

N

Y

Constant-folding:

((src0.p != src1.p) || (src0.o != src1.o) || (src0.n != src1.n) || (src0.m != src1.m) || (src0.l != src1.l) || (src0.k != src1.k) || (src0.j != src1.j) || (src0.i != src1.i) || (src0.h != src1.h) || (src0.g != src1.g) || (src0.f != src1.f) || (src0.e != src1.e) || (src0.w != src1.w) || (src0.z != src1.z) || (src0.y != src1.y) || (src0.x != src1.x))

Builder function:

nir_ssa_def *nir_b8any_fnequal16(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1)
b8any_fnequal3(float[3] src0, float[3] src1)bool8[1]

Properties:

Per-component

Associative

2-src commutative

N

N

Y

Constant-folding:

((src0.z != src1.z) || (src0.y != src1.y) || (src0.x != src1.x))

Builder function:

nir_ssa_def *nir_b8any_fnequal3(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1)
b8any_fnequal5(float[5] src0, float[5] src1)bool8[1]

Properties:

Per-component

Associative

2-src commutative

N

N

Y

Constant-folding:

((src0.e != src1.e) || (src0.w != src1.w) || (src0.z != src1.z) || (src0.y != src1.y) || (src0.x != src1.x))

Builder function:

nir_ssa_def *nir_b8any_fnequal5(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1)
b16any_fnequal2(float[2] src0, float[2] src1)bool16[1]

Properties:

Per-component

Associative

2-src commutative

N

N

Y

Constant-folding:

((src0.y != src1.y) || (src0.x != src1.x))

Builder function:

nir_ssa_def *nir_b16any_fnequal2(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1)
b16any_fnequal4(float[4] src0, float[4] src1)bool16[1]

Properties:

Per-component

Associative

2-src commutative

N

N

Y

Constant-folding:

((src0.w != src1.w) || (src0.z != src1.z) || (src0.y != src1.y) || (src0.x != src1.x))

Builder function:

nir_ssa_def *nir_b16any_fnequal4(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1)
b16any_fnequal8(float[8] src0, float[8] src1)bool16[1]

Properties:

Per-component

Associative

2-src commutative

N

N

Y

Constant-folding:

((src0.h != src1.h) || (src0.g != src1.g) || (src0.f != src1.f) || (src0.e != src1.e) || (src0.w != src1.w) || (src0.z != src1.z) || (src0.y != src1.y) || (src0.x != src1.x))

Builder function:

nir_ssa_def *nir_b16any_fnequal8(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1)
b16any_fnequal16(float[16] src0, float[16] src1)bool16[1]

Properties:

Per-component

Associative

2-src commutative

N

N

Y

Constant-folding:

((src0.p != src1.p) || (src0.o != src1.o) || (src0.n != src1.n) || (src0.m != src1.m) || (src0.l != src1.l) || (src0.k != src1.k) || (src0.j != src1.j) || (src0.i != src1.i) || (src0.h != src1.h) || (src0.g != src1.g) || (src0.f != src1.f) || (src0.e != src1.e) || (src0.w != src1.w) || (src0.z != src1.z) || (src0.y != src1.y) || (src0.x != src1.x))

Builder function:

nir_ssa_def *nir_b16any_fnequal16(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1)
b16any_fnequal3(float[3] src0, float[3] src1)bool16[1]

Properties:

Per-component

Associative

2-src commutative

N

N

Y

Constant-folding:

((src0.z != src1.z) || (src0.y != src1.y) || (src0.x != src1.x))

Builder function:

nir_ssa_def *nir_b16any_fnequal3(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1)
b16any_fnequal5(float[5] src0, float[5] src1)bool16[1]

Properties:

Per-component

Associative

2-src commutative

N

N

Y

Constant-folding:

((src0.e != src1.e) || (src0.w != src1.w) || (src0.z != src1.z) || (src0.y != src1.y) || (src0.x != src1.x))

Builder function:

nir_ssa_def *nir_b16any_fnequal5(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1)
b32any_fnequal2(float[2] src0, float[2] src1)bool32[1]

Properties:

Per-component

Associative

2-src commutative

N

N

Y

Constant-folding:

((src0.y != src1.y) || (src0.x != src1.x))

Builder function:

nir_ssa_def *nir_b32any_fnequal2(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1)
b32any_fnequal4(float[4] src0, float[4] src1)bool32[1]

Properties:

Per-component

Associative

2-src commutative

N

N

Y

Constant-folding:

((src0.w != src1.w) || (src0.z != src1.z) || (src0.y != src1.y) || (src0.x != src1.x))

Builder function:

nir_ssa_def *nir_b32any_fnequal4(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1)
b32any_fnequal8(float[8] src0, float[8] src1)bool32[1]

Properties:

Per-component

Associative

2-src commutative

N

N

Y

Constant-folding:

((src0.h != src1.h) || (src0.g != src1.g) || (src0.f != src1.f) || (src0.e != src1.e) || (src0.w != src1.w) || (src0.z != src1.z) || (src0.y != src1.y) || (src0.x != src1.x))

Builder function:

nir_ssa_def *nir_b32any_fnequal8(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1)
b32any_fnequal16(float[16] src0, float[16] src1)bool32[1]

Properties:

Per-component

Associative

2-src commutative

N

N

Y

Constant-folding:

((src0.p != src1.p) || (src0.o != src1.o) || (src0.n != src1.n) || (src0.m != src1.m) || (src0.l != src1.l) || (src0.k != src1.k) || (src0.j != src1.j) || (src0.i != src1.i) || (src0.h != src1.h) || (src0.g != src1.g) || (src0.f != src1.f) || (src0.e != src1.e) || (src0.w != src1.w) || (src0.z != src1.z) || (src0.y != src1.y) || (src0.x != src1.x))

Builder function:

nir_ssa_def *nir_b32any_fnequal16(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1)
b32any_fnequal3(float[3] src0, float[3] src1)bool32[1]

Properties:

Per-component

Associative

2-src commutative

N

N

Y

Constant-folding:

((src0.z != src1.z) || (src0.y != src1.y) || (src0.x != src1.x))

Builder function:

nir_ssa_def *nir_b32any_fnequal3(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1)
b32any_fnequal5(float[5] src0, float[5] src1)bool32[1]

Properties:

Per-component

Associative

2-src commutative

N

N

Y

Constant-folding:

((src0.e != src1.e) || (src0.w != src1.w) || (src0.z != src1.z) || (src0.y != src1.y) || (src0.x != src1.x))

Builder function:

nir_ssa_def *nir_b32any_fnequal5(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1)
ball_iequal2(int[2] src0, int[2] src1)bool1[1]

Properties:

Per-component

Associative

2-src commutative

N

N

Y

Constant-folding:

((src0.y == src1.y) && (src0.x == src1.x))

Builder function:

nir_ssa_def *nir_ball_iequal2(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1)
ball_iequal4(int[4] src0, int[4] src1)bool1[1]

Properties:

Per-component

Associative

2-src commutative

N

N

Y

Constant-folding:

((src0.w == src1.w) && (src0.z == src1.z) && (src0.y == src1.y) && (src0.x == src1.x))

Builder function:

nir_ssa_def *nir_ball_iequal4(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1)
ball_iequal8(int[8] src0, int[8] src1)bool1[1]

Properties:

Per-component

Associative

2-src commutative

N

N

Y

Constant-folding:

((src0.h == src1.h) && (src0.g == src1.g) && (src0.f == src1.f) && (src0.e == src1.e) && (src0.w == src1.w) && (src0.z == src1.z) && (src0.y == src1.y) && (src0.x == src1.x))

Builder function:

nir_ssa_def *nir_ball_iequal8(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1)
ball_iequal16(int[16] src0, int[16] src1)bool1[1]

Properties:

Per-component

Associative

2-src commutative

N

N

Y

Constant-folding:

((src0.p == src1.p) && (src0.o == src1.o) && (src0.n == src1.n) && (src0.m == src1.m) && (src0.l == src1.l) && (src0.k == src1.k) && (src0.j == src1.j) && (src0.i == src1.i) && (src0.h == src1.h) && (src0.g == src1.g) && (src0.f == src1.f) && (src0.e == src1.e) && (src0.w == src1.w) && (src0.z == src1.z) && (src0.y == src1.y) && (src0.x == src1.x))

Builder function:

nir_ssa_def *nir_ball_iequal16(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1)
ball_iequal3(int[3] src0, int[3] src1)bool1[1]

Properties:

Per-component

Associative

2-src commutative

N

N

Y

Constant-folding:

((src0.z == src1.z) && (src0.y == src1.y) && (src0.x == src1.x))

Builder function:

nir_ssa_def *nir_ball_iequal3(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1)
ball_iequal5(int[5] src0, int[5] src1)bool1[1]

Properties:

Per-component

Associative

2-src commutative

N

N

Y

Constant-folding:

((src0.e == src1.e) && (src0.w == src1.w) && (src0.z == src1.z) && (src0.y == src1.y) && (src0.x == src1.x))

Builder function:

nir_ssa_def *nir_ball_iequal5(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1)
b8all_iequal2(int[2] src0, int[2] src1)bool8[1]

Properties:

Per-component

Associative

2-src commutative

N

N

Y

Constant-folding:

((src0.y == src1.y) && (src0.x == src1.x))

Builder function:

nir_ssa_def *nir_b8all_iequal2(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1)
b8all_iequal4(int[4] src0, int[4] src1)bool8[1]

Properties:

Per-component

Associative

2-src commutative

N

N

Y

Constant-folding:

((src0.w == src1.w) && (src0.z == src1.z) && (src0.y == src1.y) && (src0.x == src1.x))

Builder function:

nir_ssa_def *nir_b8all_iequal4(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1)
b8all_iequal8(int[8] src0, int[8] src1)bool8[1]

Properties:

Per-component

Associative

2-src commutative

N

N

Y

Constant-folding:

((src0.h == src1.h) && (src0.g == src1.g) && (src0.f == src1.f) && (src0.e == src1.e) && (src0.w == src1.w) && (src0.z == src1.z) && (src0.y == src1.y) && (src0.x == src1.x))

Builder function:

nir_ssa_def *nir_b8all_iequal8(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1)
b8all_iequal16(int[16] src0, int[16] src1)bool8[1]

Properties:

Per-component

Associative

2-src commutative

N

N

Y

Constant-folding:

((src0.p == src1.p) && (src0.o == src1.o) && (src0.n == src1.n) && (src0.m == src1.m) && (src0.l == src1.l) && (src0.k == src1.k) && (src0.j == src1.j) && (src0.i == src1.i) && (src0.h == src1.h) && (src0.g == src1.g) && (src0.f == src1.f) && (src0.e == src1.e) && (src0.w == src1.w) && (src0.z == src1.z) && (src0.y == src1.y) && (src0.x == src1.x))

Builder function:

nir_ssa_def *nir_b8all_iequal16(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1)
b8all_iequal3(int[3] src0, int[3] src1)bool8[1]

Properties:

Per-component

Associative

2-src commutative

N

N

Y

Constant-folding:

((src0.z == src1.z) && (src0.y == src1.y) && (src0.x == src1.x))

Builder function:

nir_ssa_def *nir_b8all_iequal3(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1)
b8all_iequal5(int[5] src0, int[5] src1)bool8[1]

Properties:

Per-component

Associative

2-src commutative

N

N

Y

Constant-folding:

((src0.e == src1.e) && (src0.w == src1.w) && (src0.z == src1.z) && (src0.y == src1.y) && (src0.x == src1.x))

Builder function:

nir_ssa_def *nir_b8all_iequal5(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1)
b16all_iequal2(int[2] src0, int[2] src1)bool16[1]

Properties:

Per-component

Associative

2-src commutative

N

N

Y

Constant-folding:

((src0.y == src1.y) && (src0.x == src1.x))

Builder function:

nir_ssa_def *nir_b16all_iequal2(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1)
b16all_iequal4(int[4] src0, int[4] src1)bool16[1]

Properties:

Per-component

Associative

2-src commutative

N

N

Y

Constant-folding:

((src0.w == src1.w) && (src0.z == src1.z) && (src0.y == src1.y) && (src0.x == src1.x))

Builder function:

nir_ssa_def *nir_b16all_iequal4(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1)
b16all_iequal8(int[8] src0, int[8] src1)bool16[1]

Properties:

Per-component

Associative

2-src commutative

N

N

Y

Constant-folding:

((src0.h == src1.h) && (src0.g == src1.g) && (src0.f == src1.f) && (src0.e == src1.e) && (src0.w == src1.w) && (src0.z == src1.z) && (src0.y == src1.y) && (src0.x == src1.x))

Builder function:

nir_ssa_def *nir_b16all_iequal8(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1)
b16all_iequal16(int[16] src0, int[16] src1)bool16[1]

Properties:

Per-component

Associative

2-src commutative

N

N

Y

Constant-folding:

((src0.p == src1.p) && (src0.o == src1.o) && (src0.n == src1.n) && (src0.m == src1.m) && (src0.l == src1.l) && (src0.k == src1.k) && (src0.j == src1.j) && (src0.i == src1.i) && (src0.h == src1.h) && (src0.g == src1.g) && (src0.f == src1.f) && (src0.e == src1.e) && (src0.w == src1.w) && (src0.z == src1.z) && (src0.y == src1.y) && (src0.x == src1.x))

Builder function:

nir_ssa_def *nir_b16all_iequal16(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1)
b16all_iequal3(int[3] src0, int[3] src1)bool16[1]

Properties:

Per-component

Associative

2-src commutative

N

N

Y

Constant-folding:

((src0.z == src1.z) && (src0.y == src1.y) && (src0.x == src1.x))

Builder function:

nir_ssa_def *nir_b16all_iequal3(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1)
b16all_iequal5(int[5] src0, int[5] src1)bool16[1]

Properties:

Per-component

Associative

2-src commutative

N

N

Y

Constant-folding:

((src0.e == src1.e) && (src0.w == src1.w) && (src0.z == src1.z) && (src0.y == src1.y) && (src0.x == src1.x))

Builder function:

nir_ssa_def *nir_b16all_iequal5(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1)
b32all_iequal2(int[2] src0, int[2] src1)bool32[1]

Properties:

Per-component

Associative

2-src commutative

N

N

Y

Constant-folding:

((src0.y == src1.y) && (src0.x == src1.x))

Builder function:

nir_ssa_def *nir_b32all_iequal2(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1)
b32all_iequal4(int[4] src0, int[4] src1)bool32[1]

Properties:

Per-component

Associative

2-src commutative

N

N

Y

Constant-folding:

((src0.w == src1.w) && (src0.z == src1.z) && (src0.y == src1.y) && (src0.x == src1.x))

Builder function:

nir_ssa_def *nir_b32all_iequal4(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1)
b32all_iequal8(int[8] src0, int[8] src1)bool32[1]

Properties:

Per-component

Associative

2-src commutative

N

N

Y

Constant-folding:

((src0.h == src1.h) && (src0.g == src1.g) && (src0.f == src1.f) && (src0.e == src1.e) && (src0.w == src1.w) && (src0.z == src1.z) && (src0.y == src1.y) && (src0.x == src1.x))

Builder function:

nir_ssa_def *nir_b32all_iequal8(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1)
b32all_iequal16(int[16] src0, int[16] src1)bool32[1]

Properties:

Per-component

Associative

2-src commutative

N

N

Y

Constant-folding:

((src0.p == src1.p) && (src0.o == src1.o) && (src0.n == src1.n) && (src0.m == src1.m) && (src0.l == src1.l) && (src0.k == src1.k) && (src0.j == src1.j) && (src0.i == src1.i) && (src0.h == src1.h) && (src0.g == src1.g) && (src0.f == src1.f) && (src0.e == src1.e) && (src0.w == src1.w) && (src0.z == src1.z) && (src0.y == src1.y) && (src0.x == src1.x))

Builder function:

nir_ssa_def *nir_b32all_iequal16(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1)
b32all_iequal3(int[3] src0, int[3] src1)bool32[1]

Properties:

Per-component

Associative

2-src commutative

N

N

Y

Constant-folding:

((src0.z == src1.z) && (src0.y == src1.y) && (src0.x == src1.x))

Builder function:

nir_ssa_def *nir_b32all_iequal3(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1)
b32all_iequal5(int[5] src0, int[5] src1)bool32[1]

Properties:

Per-component

Associative

2-src commutative

N

N

Y

Constant-folding:

((src0.e == src1.e) && (src0.w == src1.w) && (src0.z == src1.z) && (src0.y == src1.y) && (src0.x == src1.x))

Builder function:

nir_ssa_def *nir_b32all_iequal5(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1)
bany_inequal2(int[2] src0, int[2] src1)bool1[1]

Properties:

Per-component

Associative

2-src commutative

N

N

Y

Constant-folding:

((src0.y != src1.y) || (src0.x != src1.x))

Builder function:

nir_ssa_def *nir_bany_inequal2(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1)
bany_inequal4(int[4] src0, int[4] src1)bool1[1]

Properties:

Per-component

Associative

2-src commutative

N

N

Y

Constant-folding:

((src0.w != src1.w) || (src0.z != src1.z) || (src0.y != src1.y) || (src0.x != src1.x))

Builder function:

nir_ssa_def *nir_bany_inequal4(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1)
bany_inequal8(int[8] src0, int[8] src1)bool1[1]

Properties:

Per-component

Associative

2-src commutative

N

N

Y

Constant-folding:

((src0.h != src1.h) || (src0.g != src1.g) || (src0.f != src1.f) || (src0.e != src1.e) || (src0.w != src1.w) || (src0.z != src1.z) || (src0.y != src1.y) || (src0.x != src1.x))

Builder function:

nir_ssa_def *nir_bany_inequal8(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1)
bany_inequal16(int[16] src0, int[16] src1)bool1[1]

Properties:

Per-component

Associative

2-src commutative

N

N

Y

Constant-folding:

((src0.p != src1.p) || (src0.o != src1.o) || (src0.n != src1.n) || (src0.m != src1.m) || (src0.l != src1.l) || (src0.k != src1.k) || (src0.j != src1.j) || (src0.i != src1.i) || (src0.h != src1.h) || (src0.g != src1.g) || (src0.f != src1.f) || (src0.e != src1.e) || (src0.w != src1.w) || (src0.z != src1.z) || (src0.y != src1.y) || (src0.x != src1.x))

Builder function:

nir_ssa_def *nir_bany_inequal16(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1)
bany_inequal3(int[3] src0, int[3] src1)bool1[1]

Properties:

Per-component

Associative

2-src commutative

N

N

Y

Constant-folding:

((src0.z != src1.z) || (src0.y != src1.y) || (src0.x != src1.x))

Builder function:

nir_ssa_def *nir_bany_inequal3(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1)
bany_inequal5(int[5] src0, int[5] src1)bool1[1]

Properties:

Per-component

Associative

2-src commutative

N

N

Y

Constant-folding:

((src0.e != src1.e) || (src0.w != src1.w) || (src0.z != src1.z) || (src0.y != src1.y) || (src0.x != src1.x))

Builder function:

nir_ssa_def *nir_bany_inequal5(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1)
b8any_inequal2(int[2] src0, int[2] src1)bool8[1]

Properties:

Per-component

Associative

2-src commutative

N

N

Y

Constant-folding:

((src0.y != src1.y) || (src0.x != src1.x))

Builder function:

nir_ssa_def *nir_b8any_inequal2(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1)
b8any_inequal4(int[4] src0, int[4] src1)bool8[1]

Properties:

Per-component

Associative

2-src commutative

N

N

Y

Constant-folding:

((src0.w != src1.w) || (src0.z != src1.z) || (src0.y != src1.y) || (src0.x != src1.x))

Builder function:

nir_ssa_def *nir_b8any_inequal4(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1)
b8any_inequal8(int[8] src0, int[8] src1)bool8[1]

Properties:

Per-component

Associative

2-src commutative

N

N

Y

Constant-folding:

((src0.h != src1.h) || (src0.g != src1.g) || (src0.f != src1.f) || (src0.e != src1.e) || (src0.w != src1.w) || (src0.z != src1.z) || (src0.y != src1.y) || (src0.x != src1.x))

Builder function:

nir_ssa_def *nir_b8any_inequal8(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1)
b8any_inequal16(int[16] src0, int[16] src1)bool8[1]

Properties:

Per-component

Associative

2-src commutative

N

N

Y

Constant-folding:

((src0.p != src1.p) || (src0.o != src1.o) || (src0.n != src1.n) || (src0.m != src1.m) || (src0.l != src1.l) || (src0.k != src1.k) || (src0.j != src1.j) || (src0.i != src1.i) || (src0.h != src1.h) || (src0.g != src1.g) || (src0.f != src1.f) || (src0.e != src1.e) || (src0.w != src1.w) || (src0.z != src1.z) || (src0.y != src1.y) || (src0.x != src1.x))

Builder function:

nir_ssa_def *nir_b8any_inequal16(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1)
b8any_inequal3(int[3] src0, int[3] src1)bool8[1]

Properties:

Per-component

Associative

2-src commutative

N

N

Y

Constant-folding:

((src0.z != src1.z) || (src0.y != src1.y) || (src0.x != src1.x))

Builder function:

nir_ssa_def *nir_b8any_inequal3(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1)
b8any_inequal5(int[5] src0, int[5] src1)bool8[1]

Properties:

Per-component

Associative

2-src commutative

N

N

Y

Constant-folding:

((src0.e != src1.e) || (src0.w != src1.w) || (src0.z != src1.z) || (src0.y != src1.y) || (src0.x != src1.x))

Builder function:

nir_ssa_def *nir_b8any_inequal5(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1)
b16any_inequal2(int[2] src0, int[2] src1)bool16[1]

Properties:

Per-component

Associative

2-src commutative

N

N

Y

Constant-folding:

((src0.y != src1.y) || (src0.x != src1.x))

Builder function:

nir_ssa_def *nir_b16any_inequal2(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1)
b16any_inequal4(int[4] src0, int[4] src1)bool16[1]

Properties:

Per-component

Associative

2-src commutative

N

N

Y

Constant-folding:

((src0.w != src1.w) || (src0.z != src1.z) || (src0.y != src1.y) || (src0.x != src1.x))

Builder function:

nir_ssa_def *nir_b16any_inequal4(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1)
b16any_inequal8(int[8] src0, int[8] src1)bool16[1]

Properties:

Per-component

Associative

2-src commutative

N

N

Y

Constant-folding:

((src0.h != src1.h) || (src0.g != src1.g) || (src0.f != src1.f) || (src0.e != src1.e) || (src0.w != src1.w) || (src0.z != src1.z) || (src0.y != src1.y) || (src0.x != src1.x))

Builder function:

nir_ssa_def *nir_b16any_inequal8(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1)
b16any_inequal16(int[16] src0, int[16] src1)bool16[1]

Properties:

Per-component

Associative

2-src commutative

N

N

Y

Constant-folding:

((src0.p != src1.p) || (src0.o != src1.o) || (src0.n != src1.n) || (src0.m != src1.m) || (src0.l != src1.l) || (src0.k != src1.k) || (src0.j != src1.j) || (src0.i != src1.i) || (src0.h != src1.h) || (src0.g != src1.g) || (src0.f != src1.f) || (src0.e != src1.e) || (src0.w != src1.w) || (src0.z != src1.z) || (src0.y != src1.y) || (src0.x != src1.x))

Builder function:

nir_ssa_def *nir_b16any_inequal16(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1)
b16any_inequal3(int[3] src0, int[3] src1)bool16[1]

Properties:

Per-component

Associative

2-src commutative

N

N

Y

Constant-folding:

((src0.z != src1.z) || (src0.y != src1.y) || (src0.x != src1.x))

Builder function:

nir_ssa_def *nir_b16any_inequal3(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1)
b16any_inequal5(int[5] src0, int[5] src1)bool16[1]

Properties:

Per-component

Associative

2-src commutative

N

N

Y

Constant-folding:

((src0.e != src1.e) || (src0.w != src1.w) || (src0.z != src1.z) || (src0.y != src1.y) || (src0.x != src1.x))

Builder function:

nir_ssa_def *nir_b16any_inequal5(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1)
b32any_inequal2(int[2] src0, int[2] src1)bool32[1]

Properties:

Per-component

Associative

2-src commutative

N

N

Y

Constant-folding:

((src0.y != src1.y) || (src0.x != src1.x))

Builder function:

nir_ssa_def *nir_b32any_inequal2(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1)
b32any_inequal4(int[4] src0, int[4] src1)bool32[1]

Properties:

Per-component

Associative

2-src commutative

N

N

Y

Constant-folding:

((src0.w != src1.w) || (src0.z != src1.z) || (src0.y != src1.y) || (src0.x != src1.x))

Builder function:

nir_ssa_def *nir_b32any_inequal4(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1)
b32any_inequal8(int[8] src0, int[8] src1)bool32[1]

Properties:

Per-component

Associative

2-src commutative

N

N

Y

Constant-folding:

((src0.h != src1.h) || (src0.g != src1.g) || (src0.f != src1.f) || (src0.e != src1.e) || (src0.w != src1.w) || (src0.z != src1.z) || (src0.y != src1.y) || (src0.x != src1.x))

Builder function:

nir_ssa_def *nir_b32any_inequal8(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1)
b32any_inequal16(int[16] src0, int[16] src1)bool32[1]

Properties:

Per-component

Associative

2-src commutative

N

N

Y

Constant-folding:

((src0.p != src1.p) || (src0.o != src1.o) || (src0.n != src1.n) || (src0.m != src1.m) || (src0.l != src1.l) || (src0.k != src1.k) || (src0.j != src1.j) || (src0.i != src1.i) || (src0.h != src1.h) || (src0.g != src1.g) || (src0.f != src1.f) || (src0.e != src1.e) || (src0.w != src1.w) || (src0.z != src1.z) || (src0.y != src1.y) || (src0.x != src1.x))

Builder function:

nir_ssa_def *nir_b32any_inequal16(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1)
b32any_inequal3(int[3] src0, int[3] src1)bool32[1]

Properties:

Per-component

Associative

2-src commutative

N

N

Y

Constant-folding:

((src0.z != src1.z) || (src0.y != src1.y) || (src0.x != src1.x))

Builder function:

nir_ssa_def *nir_b32any_inequal3(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1)
b32any_inequal5(int[5] src0, int[5] src1)bool32[1]

Properties:

Per-component

Associative

2-src commutative

N

N

Y

Constant-folding:

((src0.e != src1.e) || (src0.w != src1.w) || (src0.z != src1.z) || (src0.y != src1.y) || (src0.x != src1.x))

Builder function:

nir_ssa_def *nir_b32any_inequal5(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1)
fall_equal2(float32[2] src0, float32[2] src1)float32[1]

Properties:

Per-component

Associative

2-src commutative

N

N

Y

Constant-folding:

((src0.y == src1.y) && (src0.x == src1.x)) ? 1.0f : 0.0f

Builder function:

nir_ssa_def *nir_fall_equal2(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1)
fall_equal4(float32[4] src0, float32[4] src1)float32[1]

Properties:

Per-component

Associative

2-src commutative

N

N

Y

Constant-folding:

((src0.w == src1.w) && (src0.z == src1.z) && (src0.y == src1.y) && (src0.x == src1.x)) ? 1.0f : 0.0f

Builder function:

nir_ssa_def *nir_fall_equal4(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1)
fall_equal8(float32[8] src0, float32[8] src1)float32[1]

Properties:

Per-component

Associative

2-src commutative

N

N

Y

Constant-folding:

((src0.h == src1.h) && (src0.g == src1.g) && (src0.f == src1.f) && (src0.e == src1.e) && (src0.w == src1.w) && (src0.z == src1.z) && (src0.y == src1.y) && (src0.x == src1.x)) ? 1.0f : 0.0f

Builder function:

nir_ssa_def *nir_fall_equal8(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1)
fall_equal16(float32[16] src0, float32[16] src1)float32[1]

Properties:

Per-component

Associative

2-src commutative

N

N

Y

Constant-folding:

((src0.p == src1.p) && (src0.o == src1.o) && (src0.n == src1.n) && (src0.m == src1.m) && (src0.l == src1.l) && (src0.k == src1.k) && (src0.j == src1.j) && (src0.i == src1.i) && (src0.h == src1.h) && (src0.g == src1.g) && (src0.f == src1.f) && (src0.e == src1.e) && (src0.w == src1.w) && (src0.z == src1.z) && (src0.y == src1.y) && (src0.x == src1.x)) ? 1.0f : 0.0f

Builder function:

nir_ssa_def *nir_fall_equal16(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1)
fall_equal3(float32[3] src0, float32[3] src1)float32[1]

Properties:

Per-component

Associative

2-src commutative

N

N

Y

Constant-folding:

((src0.z == src1.z) && (src0.y == src1.y) && (src0.x == src1.x)) ? 1.0f : 0.0f

Builder function:

nir_ssa_def *nir_fall_equal3(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1)
fall_equal5(float32[5] src0, float32[5] src1)float32[1]

Properties:

Per-component

Associative

2-src commutative

N

N

Y

Constant-folding:

((src0.e == src1.e) && (src0.w == src1.w) && (src0.z == src1.z) && (src0.y == src1.y) && (src0.x == src1.x)) ? 1.0f : 0.0f

Builder function:

nir_ssa_def *nir_fall_equal5(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1)
fany_nequal2(float32[2] src0, float32[2] src1)float32[1]

Properties:

Per-component

Associative

2-src commutative

N

N

Y

Constant-folding:

((src0.y != src1.y) || (src0.x != src1.x)) ? 1.0f : 0.0f

Builder function:

nir_ssa_def *nir_fany_nequal2(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1)
fany_nequal4(float32[4] src0, float32[4] src1)float32[1]

Properties:

Per-component

Associative

2-src commutative

N

N

Y

Constant-folding:

((src0.w != src1.w) || (src0.z != src1.z) || (src0.y != src1.y) || (src0.x != src1.x)) ? 1.0f : 0.0f

Builder function:

nir_ssa_def *nir_fany_nequal4(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1)
fany_nequal8(float32[8] src0, float32[8] src1)float32[1]

Properties:

Per-component

Associative

2-src commutative

N

N

Y

Constant-folding:

((src0.h != src1.h) || (src0.g != src1.g) || (src0.f != src1.f) || (src0.e != src1.e) || (src0.w != src1.w) || (src0.z != src1.z) || (src0.y != src1.y) || (src0.x != src1.x)) ? 1.0f : 0.0f

Builder function:

nir_ssa_def *nir_fany_nequal8(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1)
fany_nequal16(float32[16] src0, float32[16] src1)float32[1]

Properties:

Per-component

Associative

2-src commutative

N

N

Y

Constant-folding:

((src0.p != src1.p) || (src0.o != src1.o) || (src0.n != src1.n) || (src0.m != src1.m) || (src0.l != src1.l) || (src0.k != src1.k) || (src0.j != src1.j) || (src0.i != src1.i) || (src0.h != src1.h) || (src0.g != src1.g) || (src0.f != src1.f) || (src0.e != src1.e) || (src0.w != src1.w) || (src0.z != src1.z) || (src0.y != src1.y) || (src0.x != src1.x)) ? 1.0f : 0.0f

Builder function:

nir_ssa_def *nir_fany_nequal16(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1)
fany_nequal3(float32[3] src0, float32[3] src1)float32[1]

Properties:

Per-component

Associative

2-src commutative

N

N

Y

Constant-folding:

((src0.z != src1.z) || (src0.y != src1.y) || (src0.x != src1.x)) ? 1.0f : 0.0f

Builder function:

nir_ssa_def *nir_fany_nequal3(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1)
fany_nequal5(float32[5] src0, float32[5] src1)float32[1]

Properties:

Per-component

Associative

2-src commutative

N

N

Y

Constant-folding:

((src0.e != src1.e) || (src0.w != src1.w) || (src0.z != src1.z) || (src0.y != src1.y) || (src0.x != src1.x)) ? 1.0f : 0.0f

Builder function:

nir_ssa_def *nir_fany_nequal5(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1)
slt(float32[N] src0, float32[N] src1)float32[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Constant-folding:

(src0 < src1) ? 1.0f : 0.0f

Builder function:

nir_ssa_def *nir_slt(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1)
sge(float[N] src0, float[N] src1)float[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Constant-folding:

(src0 >= src1) ? 1.0f : 0.0f

Builder function:

nir_ssa_def *nir_sge(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1)
seq(float32[N] src0, float32[N] src1)float32[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

Y

Constant-folding:

(src0 == src1) ? 1.0f : 0.0f

Builder function:

nir_ssa_def *nir_seq(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1)
sne(float32[N] src0, float32[N] src1)float32[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

Y

Constant-folding:

(src0 != src1) ? 1.0f : 0.0f

Builder function:

nir_ssa_def *nir_sne(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1)
ishl(int[N] src0, uint32[N] src1)int[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Constant-folding:

(uint64_t)src0 << (src1 & (sizeof(src0) * 8 - 1))

Builder function:

nir_ssa_def *nir_ishl(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1)
ishr(int[N] src0, uint32[N] src1)int[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Constant-folding:

src0 >> (src1 & (sizeof(src0) * 8 - 1))

Builder function:

nir_ssa_def *nir_ishr(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1)
ushr(uint[N] src0, uint32[N] src1)uint[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Constant-folding:

src0 >> (src1 & (sizeof(src0) * 8 - 1))

Builder function:

nir_ssa_def *nir_ushr(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1)
urol(uint[N] src0, uint32[N] src1)uint[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Constant-folding:

uint32_t rotate_mask = sizeof(src0) * 8 - 1;
dst = (src0 << (src1 & rotate_mask)) |
      (src0 >> (-src1 & rotate_mask));

Builder function:

nir_ssa_def *nir_urol(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1)
uror(uint[N] src0, uint32[N] src1)uint[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Constant-folding:

uint32_t rotate_mask = sizeof(src0) * 8 - 1;
dst = (src0 >> (src1 & rotate_mask)) |
      (src0 << (-src1 & rotate_mask));

Builder function:

nir_ssa_def *nir_uror(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1)
iand(uint[N] src0, uint[N] src1)uint[N]

Properties:

Per-component

Associative

2-src commutative

Y

Y

Y

Constant-folding:

src0 & src1

Builder function:

nir_ssa_def *nir_iand(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1)
ior(uint[N] src0, uint[N] src1)uint[N]

Properties:

Per-component

Associative

2-src commutative

Y

Y

Y

Constant-folding:

src0 | src1

Builder function:

nir_ssa_def *nir_ior(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1)
ixor(uint[N] src0, uint[N] src1)uint[N]

Properties:

Per-component

Associative

2-src commutative

Y

Y

Y

Constant-folding:

src0 ^ src1

Builder function:

nir_ssa_def *nir_ixor(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1)
fdot2(float[2] src0, float[2] src1)float[1]

Properties:

Per-component

Associative

2-src commutative

N

N

Y

Constant-folding:

((src0.y * src1.y) + (src0.x * src1.x))

Builder function:

nir_ssa_def *nir_fdot2(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1)
fdot4(float[4] src0, float[4] src1)float[1]

Properties:

Per-component

Associative

2-src commutative

N

N

Y

Constant-folding:

((src0.w * src1.w) + (src0.z * src1.z) + (src0.y * src1.y) + (src0.x * src1.x))

Builder function:

nir_ssa_def *nir_fdot4(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1)
fdot8(float[8] src0, float[8] src1)float[1]

Properties:

Per-component

Associative

2-src commutative

N

N

Y

Constant-folding:

((src0.h * src1.h) + (src0.g * src1.g) + (src0.f * src1.f) + (src0.e * src1.e) + (src0.w * src1.w) + (src0.z * src1.z) + (src0.y * src1.y) + (src0.x * src1.x))

Builder function:

nir_ssa_def *nir_fdot8(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1)
fdot16(float[16] src0, float[16] src1)float[1]

Properties:

Per-component

Associative

2-src commutative

N

N

Y

Constant-folding:

((src0.p * src1.p) + (src0.o * src1.o) + (src0.n * src1.n) + (src0.m * src1.m) + (src0.l * src1.l) + (src0.k * src1.k) + (src0.j * src1.j) + (src0.i * src1.i) + (src0.h * src1.h) + (src0.g * src1.g) + (src0.f * src1.f) + (src0.e * src1.e) + (src0.w * src1.w) + (src0.z * src1.z) + (src0.y * src1.y) + (src0.x * src1.x))

Builder function:

nir_ssa_def *nir_fdot16(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1)
fdot3(float[3] src0, float[3] src1)float[1]

Properties:

Per-component

Associative

2-src commutative

N

N

Y

Constant-folding:

((src0.z * src1.z) + (src0.y * src1.y) + (src0.x * src1.x))

Builder function:

nir_ssa_def *nir_fdot3(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1)
fdot5(float[5] src0, float[5] src1)float[1]

Properties:

Per-component

Associative

2-src commutative

N

N

Y

Constant-folding:

((src0.e * src1.e) + (src0.w * src1.w) + (src0.z * src1.z) + (src0.y * src1.y) + (src0.x * src1.x))

Builder function:

nir_ssa_def *nir_fdot5(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1)
fdot2_replicated(float[2] src0, float[2] src1)float[4]

Properties:

Per-component

Associative

2-src commutative

N

N

Y

Constant-folding:

((src0.y * src1.y) + (src0.x * src1.x))

Builder function:

nir_ssa_def *nir_fdot2_replicated(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1)
fdot4_replicated(float[4] src0, float[4] src1)float[4]

Properties:

Per-component

Associative

2-src commutative

N

N

Y

Constant-folding:

((src0.w * src1.w) + (src0.z * src1.z) + (src0.y * src1.y) + (src0.x * src1.x))

Builder function:

nir_ssa_def *nir_fdot4_replicated(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1)
fdot8_replicated(float[8] src0, float[8] src1)float[4]

Properties:

Per-component

Associative

2-src commutative

N

N

Y

Constant-folding:

((src0.h * src1.h) + (src0.g * src1.g) + (src0.f * src1.f) + (src0.e * src1.e) + (src0.w * src1.w) + (src0.z * src1.z) + (src0.y * src1.y) + (src0.x * src1.x))

Builder function:

nir_ssa_def *nir_fdot8_replicated(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1)
fdot16_replicated(float[16] src0, float[16] src1)float[4]

Properties:

Per-component

Associative

2-src commutative

N

N

Y

Constant-folding:

((src0.p * src1.p) + (src0.o * src1.o) + (src0.n * src1.n) + (src0.m * src1.m) + (src0.l * src1.l) + (src0.k * src1.k) + (src0.j * src1.j) + (src0.i * src1.i) + (src0.h * src1.h) + (src0.g * src1.g) + (src0.f * src1.f) + (src0.e * src1.e) + (src0.w * src1.w) + (src0.z * src1.z) + (src0.y * src1.y) + (src0.x * src1.x))

Builder function:

nir_ssa_def *nir_fdot16_replicated(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1)
fdot3_replicated(float[3] src0, float[3] src1)float[4]

Properties:

Per-component

Associative

2-src commutative

N

N

Y

Constant-folding:

((src0.z * src1.z) + (src0.y * src1.y) + (src0.x * src1.x))

Builder function:

nir_ssa_def *nir_fdot3_replicated(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1)
fdot5_replicated(float[5] src0, float[5] src1)float[4]

Properties:

Per-component

Associative

2-src commutative

N

N

Y

Constant-folding:

((src0.e * src1.e) + (src0.w * src1.w) + (src0.z * src1.z) + (src0.y * src1.y) + (src0.x * src1.x))

Builder function:

nir_ssa_def *nir_fdot5_replicated(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1)
fdph(float[3] src0, float[4] src1)float[1]

Properties:

Per-component

Associative

2-src commutative

N

N

N

Constant-folding:

src0.x * src1.x + src0.y * src1.y + src0.z * src1.z + src1.w

Builder function:

nir_ssa_def *nir_fdph(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1)
fdph_replicated(float[3] src0, float[4] src1)float[4]

Properties:

Per-component

Associative

2-src commutative

N

N

N

Constant-folding:

src0.x * src1.x + src0.y * src1.y + src0.z * src1.z + src1.w

Builder function:

nir_ssa_def *nir_fdph_replicated(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1)
fmin(float[N] src0, float[N] src1)float[N]

Properties:

Per-component

Associative

2-src commutative

Y

Y

Y

Constant-folding:

fmin(src0, src1)

Builder function:

nir_ssa_def *nir_fmin(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1)
imin(int[N] src0, int[N] src1)int[N]

Properties:

Per-component

Associative

2-src commutative

Y

Y

Y

Constant-folding:

src1 > src0 ? src0 : src1

Builder function:

nir_ssa_def *nir_imin(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1)
umin(uint[N] src0, uint[N] src1)uint[N]

Properties:

Per-component

Associative

2-src commutative

Y

Y

Y

Constant-folding:

src1 > src0 ? src0 : src1

Builder function:

nir_ssa_def *nir_umin(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1)
fmax(float[N] src0, float[N] src1)float[N]

Properties:

Per-component

Associative

2-src commutative

Y

Y

Y

Constant-folding:

fmax(src0, src1)

Builder function:

nir_ssa_def *nir_fmax(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1)
imax(int[N] src0, int[N] src1)int[N]

Properties:

Per-component

Associative

2-src commutative

Y

Y

Y

Constant-folding:

src1 > src0 ? src1 : src0

Builder function:

nir_ssa_def *nir_imax(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1)
umax(uint[N] src0, uint[N] src1)uint[N]

Properties:

Per-component

Associative

2-src commutative

Y

Y

Y

Constant-folding:

src1 > src0 ? src1 : src0

Builder function:

nir_ssa_def *nir_umax(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1)
fpow(float[N] src0, float[N] src1)float[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Constant-folding:

bit_size == 64 ? powf(src0, src1) : pow(src0, src1)

Builder function:

nir_ssa_def *nir_fpow(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1)
pack_half_2x16_split(float32[1] src0, float32[1] src1)uint32[1]

Properties:

Per-component

Associative

2-src commutative

N

N

N

Constant-folding:

pack_half_1x16(src0.x) | (pack_half_1x16(src1.x) << 16)

Builder function:

nir_ssa_def *nir_pack_half_2x16_split(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1)
pack_64_2x32_split(uint32[N] src0, uint32[N] src1)uint64[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Constant-folding:

src0 | ((uint64_t)src1 << 32)

Builder function:

nir_ssa_def *nir_pack_64_2x32_split(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1)
pack_32_2x16_split(uint16[N] src0, uint16[N] src1)uint32[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Constant-folding:

src0 | ((uint32_t)src1 << 16)

Builder function:

nir_ssa_def *nir_pack_32_2x16_split(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1)
pack_32_4x8_split(uint8[N] src0, uint8[N] src1, uint8[N] src2, uint8[N] src3)uint32[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Constant-folding:

src0 | ((uint32_t)src1 << 8) | ((uint32_t)src2 << 16) | ((uint32_t)src3 << 24)

Builder function:

nir_ssa_def *nir_pack_32_4x8_split(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1, nir_ssa_def *src2, nir_ssa_def *src3)
bfm(int32[N] src0, int32[N] src1)uint32[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Constant-folding:

int bits = src0 & 0x1F;
int offset = src1 & 0x1F;
dst = ((1u << bits) - 1) << offset;

Builder function:

nir_ssa_def *nir_bfm(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1)
ldexp(float[N] src0, int32[N] src1)float[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Constant-folding:

dst = (bit_size == 64) ? ldexp(src0, src1) : ldexpf(src0, src1);
/* flush denormals to zero. */
if (!isnormal(dst))
   dst = copysignf(0.0f, src0);

Builder function:

nir_ssa_def *nir_ldexp(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1)
vec2(uint[1] src0, uint[1] src1)uint[2]

Properties:

Per-component

Associative

2-src commutative

N

N

N

Constant-folding:

dst.x = src0.x;
dst.y = src1.x;

Builder function:

nir_ssa_def *nir_vec2(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1)
extract_u8(uint[N] src0, uint[N] src1)uint[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Constant-folding:

(uint8_t)(src0 >> (src1 * 8))

Builder function:

nir_ssa_def *nir_extract_u8(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1)
extract_i8(int[N] src0, int[N] src1)int[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Constant-folding:

(int8_t)(src0 >> (src1 * 8))

Builder function:

nir_ssa_def *nir_extract_i8(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1)
extract_u16(uint[N] src0, uint[N] src1)uint[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Constant-folding:

(uint16_t)(src0 >> (src1 * 16))

Builder function:

nir_ssa_def *nir_extract_u16(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1)
extract_i16(int[N] src0, int[N] src1)int[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Constant-folding:

(int16_t)(src0 >> (src1 * 16))

Builder function:

nir_ssa_def *nir_extract_i16(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1)
insert_u8(uint[N] src0, uint[N] src1)uint[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Constant-folding:

(src0 & 0xff) << (src1 * 8)

Builder function:

nir_ssa_def *nir_insert_u8(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1)
insert_u16(uint[N] src0, uint[N] src1)uint[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Constant-folding:

(src0 & 0xffff) << (src1 * 16)

Builder function:

nir_ssa_def *nir_insert_u16(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1)
ffma(float[N] src0, float[N] src1, float[N] src2)float[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

Y

Constant-folding:

if (nir_is_rounding_mode_rtz(execution_mode, bit_size)) {
   if (bit_size == 64)
      dst = _mesa_double_fma_rtz(src0, src1, src2);
   else if (bit_size == 32)
      dst = _mesa_float_fma_rtz(src0, src1, src2);
   else
      dst = _mesa_double_to_float_rtz(_mesa_double_fma_rtz(src0, src1, src2));
} else {
   if (bit_size == 32)
      dst = fmaf(src0, src1, src2);
   else
      dst = fma(src0, src1, src2);
}

Builder function:

nir_ssa_def *nir_ffma(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1, nir_ssa_def *src2)
flrp(float[N] src0, float[N] src1, float[N] src2)float[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Constant-folding:

src0 * (1 - src2) + src1 * src2

Builder function:

nir_ssa_def *nir_flrp(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1, nir_ssa_def *src2)
iadd3(int[N] src0, int[N] src1, int[N] src2)int[N]

Properties:

Per-component

Associative

2-src commutative

Y

Y

Y

Constant-folding:

src0 + src1 + src2

Builder function:

nir_ssa_def *nir_iadd3(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1, nir_ssa_def *src2)
fcsel(float32[N] src0, float32[N] src1, float32[N] src2)float32[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Constant-folding:

(src0 != 0.0f) ? src1 : src2

Builder function:

nir_ssa_def *nir_fcsel(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1, nir_ssa_def *src2)
bcsel(bool1[N] src0, uint[N] src1, uint[N] src2)uint[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Constant-folding:

src0 ? src1 : src2

Builder function:

nir_ssa_def *nir_bcsel(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1, nir_ssa_def *src2)
b8csel(bool8[N] src0, uint[N] src1, uint[N] src2)uint[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Constant-folding:

src0 ? src1 : src2

Builder function:

nir_ssa_def *nir_b8csel(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1, nir_ssa_def *src2)
b16csel(bool16[N] src0, uint[N] src1, uint[N] src2)uint[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Constant-folding:

src0 ? src1 : src2

Builder function:

nir_ssa_def *nir_b16csel(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1, nir_ssa_def *src2)
b32csel(bool32[N] src0, uint[N] src1, uint[N] src2)uint[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Constant-folding:

src0 ? src1 : src2

Builder function:

nir_ssa_def *nir_b32csel(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1, nir_ssa_def *src2)
i32csel_gt(int32[N] src0, int32[N] src1, int32[N] src2)int32[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Constant-folding:

(src0 > 0.0f) ? src1 : src2

Builder function:

nir_ssa_def *nir_i32csel_gt(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1, nir_ssa_def *src2)
i32csel_ge(int32[N] src0, int32[N] src1, int32[N] src2)int32[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Constant-folding:

(src0 >= 0.0f) ? src1 : src2

Builder function:

nir_ssa_def *nir_i32csel_ge(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1, nir_ssa_def *src2)
fcsel_gt(float32[N] src0, float32[N] src1, float32[N] src2)float32[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Constant-folding:

(src0 > 0.0f) ? src1 : src2

Builder function:

nir_ssa_def *nir_fcsel_gt(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1, nir_ssa_def *src2)
fcsel_ge(float32[N] src0, float32[N] src1, float32[N] src2)float32[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Constant-folding:

(src0 >= 0.0f) ? src1 : src2

Builder function:

nir_ssa_def *nir_fcsel_ge(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1, nir_ssa_def *src2)
bfi(uint32[N] src0, uint32[N] src1, uint32[N] src2)uint32[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Constant-folding:

unsigned mask = src0, insert = src1, base = src2;
if (mask == 0) {
   dst = base;
} else {
   unsigned tmp = mask;
   while (!(tmp & 1)) {
      tmp >>= 1;
      insert <<= 1;
   }
   dst = (base & ~mask) | (insert & mask);
}

Builder function:

nir_ssa_def *nir_bfi(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1, nir_ssa_def *src2)
bitfield_select(uint[N] src0, uint[N] src1, uint[N] src2)uint[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Constant-folding:

(src0 & src1) | (~src0 & src2)

Builder function:

nir_ssa_def *nir_bitfield_select(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1, nir_ssa_def *src2)
ubfe(uint32[N] src0, uint32[N] src1, uint32[N] src2)uint32[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Constant-folding:

unsigned base = src0;
unsigned offset = src1 & 0x1F;
unsigned bits = src2 & 0x1F;
if (bits == 0) {
   dst = 0;
} else if (offset + bits < 32) {
   dst = (base << (32 - bits - offset)) >> (32 - bits);
} else {
   dst = base >> offset;
}

Builder function:

nir_ssa_def *nir_ubfe(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1, nir_ssa_def *src2)
ibfe(int32[N] src0, uint32[N] src1, uint32[N] src2)int32[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Constant-folding:

int base = src0;
unsigned offset = src1 & 0x1F;
unsigned bits = src2 & 0x1F;
if (bits == 0) {
   dst = 0;
} else if (offset + bits < 32) {
   dst = (base << (32 - bits - offset)) >> (32 - bits);
} else {
   dst = base >> offset;
}

Builder function:

nir_ssa_def *nir_ibfe(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1, nir_ssa_def *src2)
ubitfield_extract(uint32[N] src0, int32[N] src1, int32[N] src2)uint32[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Constant-folding:

unsigned base = src0;
int offset = src1, bits = src2;
if (bits == 0) {
   dst = 0;
} else if (bits < 0 || offset < 0 || offset + bits > 32) {
   dst = 0; /* undefined per the spec */
} else {
   dst = (base >> offset) & ((1ull << bits) - 1);
}

Builder function:

nir_ssa_def *nir_ubitfield_extract(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1, nir_ssa_def *src2)
ibitfield_extract(int32[N] src0, int32[N] src1, int32[N] src2)int32[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Constant-folding:

int base = src0;
int offset = src1, bits = src2;
if (bits == 0) {
   dst = 0;
} else if (offset < 0 || bits < 0 || offset + bits > 32) {
   dst = 0;
} else {
   dst = (base << (32 - offset - bits)) >> (32 - bits); /* use sign-extending shift */
}

Builder function:

nir_ssa_def *nir_ibitfield_extract(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1, nir_ssa_def *src2)
sad_u8x4(uint[1] src0, uint[1] src1, uint[1] src2)uint[1]

Properties:

Per-component

Associative

2-src commutative

N

N

N

Constant-folding:

uint8_t s0_b0 = (src0.x & 0x000000ff) >> 0;
uint8_t s0_b1 = (src0.x & 0x0000ff00) >> 8;
uint8_t s0_b2 = (src0.x & 0x00ff0000) >> 16;
uint8_t s0_b3 = (src0.x & 0xff000000) >> 24;

uint8_t s1_b0 = (src1.x & 0x000000ff) >> 0;
uint8_t s1_b1 = (src1.x & 0x0000ff00) >> 8;
uint8_t s1_b2 = (src1.x & 0x00ff0000) >> 16;
uint8_t s1_b3 = (src1.x & 0xff000000) >> 24;

dst.x = src2.x +
        (s0_b0 > s1_b0 ? (s0_b0 - s1_b0) : (s1_b0 - s0_b0)) +
        (s0_b1 > s1_b1 ? (s0_b1 - s1_b1) : (s1_b1 - s0_b1)) +
        (s0_b2 > s1_b2 ? (s0_b2 - s1_b2) : (s1_b2 - s0_b2)) +
        (s0_b3 > s1_b3 ? (s0_b3 - s1_b3) : (s1_b3 - s0_b3));

Builder function:

nir_ssa_def *nir_sad_u8x4(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1, nir_ssa_def *src2)
vec3(uint[1] src0, uint[1] src1, uint[1] src2)uint[3]

Properties:

Per-component

Associative

2-src commutative

N

N

N

Constant-folding:

dst.x = src0.x;
dst.y = src1.x;
dst.z = src2.x;

Builder function:

nir_ssa_def *nir_vec3(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1, nir_ssa_def *src2)
bitfield_insert(uint32[N] src0, uint32[N] src1, int32[N] src2, int32[N] src3)uint32[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Constant-folding:

unsigned base = src0, insert = src1;
int offset = src2, bits = src3;
if (bits == 0) {
   dst = base;
} else if (offset < 0 || bits < 0 || bits + offset > 32) {
   dst = 0;
} else {
   unsigned mask = ((1ull << bits) - 1) << offset;
   dst = (base & ~mask) | ((insert << offset) & mask);
}

Builder function:

nir_ssa_def *nir_bitfield_insert(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1, nir_ssa_def *src2, nir_ssa_def *src3)
vec4(uint[1] src0, uint[1] src1, uint[1] src2, uint[1] src3)uint[4]

Properties:

Per-component

Associative

2-src commutative

N

N

N

Constant-folding:

dst.x = src0.x;
dst.y = src1.x;
dst.z = src2.x;
dst.w = src3.x;

Builder function:

nir_ssa_def *nir_vec4(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1, nir_ssa_def *src2, nir_ssa_def *src3)
vec5(uint[1] src0, uint[1] src1, uint[1] src2, uint[1] src3, uint[1] src4)uint[5]

Properties:

Per-component

Associative

2-src commutative

N

N

N

Constant-folding:

dst.x = src0.x;
dst.y = src1.x;
dst.z = src2.x;
dst.w = src3.x;
dst.e = src4.x;

Builder function:

nir_ssa_def *nir_vec5(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1, nir_ssa_def *src2, nir_ssa_def *src3, nir_ssa_def *src4)
vec8(uint[1] src0, uint[1] src1, uint[1] src2, uint[1] src3, uint[1] src4, uint[1] src5, uint[1] src6, uint[1] src7)uint[8]

Properties:

Per-component

Associative

2-src commutative

N

N

N

Constant-folding:

dst.x = src0.x;
dst.y = src1.x;
dst.z = src2.x;
dst.w = src3.x;
dst.e = src4.x;
dst.f = src5.x;
dst.g = src6.x;
dst.h = src7.x;

Builder function:

nir_ssa_def *nir_vec8(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1, nir_ssa_def *src2, nir_ssa_def *src3, nir_ssa_def *src4, nir_ssa_def *src5, nir_ssa_def *src6, nir_ssa_def *src7)
vec16(uint[1] src0, uint[1] src1, uint[1] src2, uint[1] src3, uint[1] src4, uint[1] src5, uint[1] src6, uint[1] src7, uint[1] src8, uint[1] src9, uint[1] src10, uint[1] src11, uint[1] src12, uint[1] src13, uint[1] src14, uint[1] src15)uint[16]

Properties:

Per-component

Associative

2-src commutative

N

N

N

Constant-folding:

dst.x = src0.x;
dst.y = src1.x;
dst.z = src2.x;
dst.w = src3.x;
dst.e = src4.x;
dst.f = src5.x;
dst.g = src6.x;
dst.h = src7.x;
dst.i = src8.x;
dst.j = src9.x;
dst.k = src10.x;
dst.l = src11.x;
dst.m = src12.x;
dst.n = src13.x;
dst.o = src14.x;
dst.p = src15.x;

Builder function:

nir_ssa_def *nir_vec16(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1, nir_ssa_def *src2, nir_ssa_def *src3, nir_ssa_def *src4, nir_ssa_def *src5, nir_ssa_def *src6, nir_ssa_def *src7, nir_ssa_def *src8, nir_ssa_def *src9, nir_ssa_def *src10, nir_ssa_def *src11, nir_ssa_def *src12, nir_ssa_def *src13, nir_ssa_def *src14, nir_ssa_def *src15)
amul(int[N] src0, int[N] src1)int[N]

Properties:

Per-component

Associative

2-src commutative

Y

Y

Y

Constant-folding:

src0 * src1

Builder function:

nir_ssa_def *nir_amul(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1)
imadsh_mix16(int32[N] src0, int32[N] src1, int32[N] src2)int32[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Constant-folding:

dst = ((((src0 & 0xffff0000) >> 16) * (src1 & 0x0000ffff)) << 16) + src2;

Builder function:

nir_ssa_def *nir_imadsh_mix16(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1, nir_ssa_def *src2)
imad24_ir3(int32[N] src0, int32[N] src1, int32[N] src2)int32[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

Y

Constant-folding:

(((int32_t)src0 << 8) >> 8) * (((int32_t)src1 << 8) >> 8) + src2

Builder function:

nir_ssa_def *nir_imad24_ir3(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1, nir_ssa_def *src2)
cube_r600(float32[3] src0)float32[4]

Properties:

Per-component

Associative

2-src commutative

N

N

N

Constant-folding:

dst.x = dst.y = dst.z = 0.0;
float absX = fabsf(src0.x);
float absY = fabsf(src0.y);
float absZ = fabsf(src0.z);

if (absX >= absY && absX >= absZ) { dst.z = 2 * src0.x; }
if (absY >= absX && absY >= absZ) { dst.z = 2 * src0.y; }
if (absZ >= absX && absZ >= absY) { dst.z = 2 * src0.z; }

if (src0.x >= 0 && absX >= absY && absX >= absZ) {
   dst.y = -src0.z; dst.x = -src0.y; dst.w = 0;
}
if (src0.x < 0 && absX >= absY && absX >= absZ) {
   dst.y = src0.z; dst.x = -src0.y; dst.w = 1;
}
if (src0.y >= 0 && absY >= absX && absY >= absZ) {
   dst.y = src0.x; dst.x = src0.z; dst.w = 2;
}
if (src0.y < 0 && absY >= absX && absY >= absZ) {
   dst.y = src0.x; dst.x = -src0.z; dst.w = 3;
}
if (src0.z >= 0 && absZ >= absX && absZ >= absY) {
   dst.y = src0.x; dst.x = -src0.y; dst.w = 4;
}
if (src0.z < 0 && absZ >= absX && absZ >= absY) {
   dst.y = -src0.x; dst.x = -src0.y; dst.w = 5;
}

Builder function:

nir_ssa_def *nir_cube_r600(nir_builder*, nir_ssa_def *src0)
fsin_r600(float32[N] src0)float32[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Constant-folding:

sinf(6.2831853 * src0)

Builder function:

nir_ssa_def *nir_fsin_r600(nir_builder*, nir_ssa_def *src0)
fcos_r600(float32[N] src0)float32[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Constant-folding:

cosf(6.2831853 * src0)

Builder function:

nir_ssa_def *nir_fcos_r600(nir_builder*, nir_ssa_def *src0)
fsin_agx(float[N] src0)float[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Constant-folding:

sinf(src0 * (6.2831853/4.0))

Builder function:

nir_ssa_def *nir_fsin_agx(nir_builder*, nir_ssa_def *src0)
imul24(int32[N] src0, int32[N] src1)int32[N]

Properties:

Per-component

Associative

2-src commutative

Y

Y

Y

Constant-folding:

(((int32_t)src0 << 8) >> 8) * (((int32_t)src1 << 8) >> 8)

Builder function:

nir_ssa_def *nir_imul24(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1)
umad24(uint32[N] src0, uint32[N] src1, uint32[N] src2)uint32[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

Y

Constant-folding:

(((uint32_t)src0 << 8) >> 8) * (((uint32_t)src1 << 8) >> 8) + src2

Builder function:

nir_ssa_def *nir_umad24(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1, nir_ssa_def *src2)
umul24(int32[N] src0, int32[N] src1)int32[N]

Properties:

Per-component

Associative

2-src commutative

Y

Y

Y

Constant-folding:

(((uint32_t)src0 << 8) >> 8) * (((uint32_t)src1 << 8) >> 8)

Builder function:

nir_ssa_def *nir_umul24(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1)
imul24_relaxed(int32[N] src0, int32[N] src1)int32[N]

Properties:

Per-component

Associative

2-src commutative

Y

Y

Y

Constant-folding:

src0 * src1

Builder function:

nir_ssa_def *nir_imul24_relaxed(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1)
umad24_relaxed(uint32[N] src0, uint32[N] src1, uint32[N] src2)uint32[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

Y

Constant-folding:

src0 * src1 + src2

Builder function:

nir_ssa_def *nir_umad24_relaxed(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1, nir_ssa_def *src2)
umul24_relaxed(uint32[N] src0, uint32[N] src1)uint32[N]

Properties:

Per-component

Associative

2-src commutative

Y

Y

Y

Constant-folding:

src0 * src1

Builder function:

nir_ssa_def *nir_umul24_relaxed(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1)
fisnormal(float[N] src0)bool1[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Constant-folding:

isnormal(src0)

Builder function:

nir_ssa_def *nir_fisnormal(nir_builder*, nir_ssa_def *src0)
fisfinite(float[N] src0)bool1[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Constant-folding:

isfinite(src0)

Builder function:

nir_ssa_def *nir_fisfinite(nir_builder*, nir_ssa_def *src0)
fisfinite32(float[N] src0)int32[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Constant-folding:

isfinite(src0)

Builder function:

nir_ssa_def *nir_fisfinite32(nir_builder*, nir_ssa_def *src0)
usadd_4x8_vc4(int32[N] src0, int32[N] src1)int32[N]

Properties:

Per-component

Associative

2-src commutative

Y

Y

Y

Constant-folding:

dst = 0;
for (int i = 0; i < 32; i += 8) {
   dst |= MIN2(((src0 >> i) & 0xff) + ((src1 >> i) & 0xff), 0xff) << i;
}

Builder function:

nir_ssa_def *nir_usadd_4x8_vc4(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1)
ussub_4x8_vc4(int32[N] src0, int32[N] src1)int32[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Constant-folding:

dst = 0;
for (int i = 0; i < 32; i += 8) {
   int src0_chan = (src0 >> i) & 0xff;
   int src1_chan = (src1 >> i) & 0xff;
   if (src0_chan > src1_chan)
      dst |= (src0_chan - src1_chan) << i;
}

Builder function:

nir_ssa_def *nir_ussub_4x8_vc4(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1)
umin_4x8_vc4(int32[N] src0, int32[N] src1)int32[N]

Properties:

Per-component

Associative

2-src commutative

Y

Y

Y

Constant-folding:

dst = 0;
for (int i = 0; i < 32; i += 8) {
   dst |= MIN2((src0 >> i) & 0xff, (src1 >> i) & 0xff) << i;
}

Builder function:

nir_ssa_def *nir_umin_4x8_vc4(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1)
umax_4x8_vc4(int32[N] src0, int32[N] src1)int32[N]

Properties:

Per-component

Associative

2-src commutative

Y

Y

Y

Constant-folding:

dst = 0;
for (int i = 0; i < 32; i += 8) {
   dst |= MAX2((src0 >> i) & 0xff, (src1 >> i) & 0xff) << i;
}

Builder function:

nir_ssa_def *nir_umax_4x8_vc4(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1)
umul_unorm_4x8_vc4(int32[N] src0, int32[N] src1)int32[N]

Properties:

Per-component

Associative

2-src commutative

Y

Y

Y

Constant-folding:

dst = 0;
for (int i = 0; i < 32; i += 8) {
   int src0_chan = (src0 >> i) & 0xff;
   int src1_chan = (src1 >> i) & 0xff;
   dst |= ((src0_chan * src1_chan) / 255) << i;
}

Builder function:

nir_ssa_def *nir_umul_unorm_4x8_vc4(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1)
fsat_signed_mali(float[N] src0)float[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Constant-folding:

fmin(fmax(src0, -1.0), 1.0)

Builder function:

nir_ssa_def *nir_fsat_signed_mali(nir_builder*, nir_ssa_def *src0)
fclamp_pos_mali(float[N] src0)float[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Constant-folding:

fmax(src0, 0.0)

Builder function:

nir_ssa_def *nir_fclamp_pos_mali(nir_builder*, nir_ssa_def *src0)
fddx_must_abs_mali(float[N] src0)float[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Constant-folding:

0.0

Builder function:

nir_ssa_def *nir_fddx_must_abs_mali(nir_builder*, nir_ssa_def *src0)
fddy_must_abs_mali(float[N] src0)float[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Constant-folding:

0.0

Builder function:

nir_ssa_def *nir_fddy_must_abs_mali(nir_builder*, nir_ssa_def *src0)
pack_double_2x32_dxil(uint32[2] src0)uint64[1]

Properties:

Per-component

Associative

2-src commutative

N

N

N

Constant-folding:

dst.x = src0.x | ((uint64_t)src0.y << 32);

Builder function:

nir_ssa_def *nir_pack_double_2x32_dxil(nir_builder*, nir_ssa_def *src0)
unpack_double_2x32_dxil(uint64[1] src0)uint32[2]

Properties:

Per-component

Associative

2-src commutative

N

N

N

Constant-folding:

dst.x = src0.x; dst.y = src0.x >> 32;

Builder function:

nir_ssa_def *nir_unpack_double_2x32_dxil(nir_builder*, nir_ssa_def *src0)
sdot_4x8_iadd(uint32[N] src0, uint32[N] src1, int32[N] src2)int32[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

Y

Constant-folding:

const int32_t v0x = (int8_t)(src0      );
const int32_t v0y = (int8_t)(src0 >>  8);
const int32_t v0z = (int8_t)(src0 >> 16);
const int32_t v0w = (int8_t)(src0 >> 24);
const int32_t v1x = (int8_t)(src1      );
const int32_t v1y = (int8_t)(src1 >>  8);
const int32_t v1z = (int8_t)(src1 >> 16);
const int32_t v1w = (int8_t)(src1 >> 24);

dst = (v0x * v1x) + (v0y * v1y) + (v0z * v1z) + (v0w * v1w) + src2;

Builder function:

nir_ssa_def *nir_sdot_4x8_iadd(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1, nir_ssa_def *src2)
udot_4x8_uadd(uint32[N] src0, uint32[N] src1, uint32[N] src2)uint32[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

Y

Constant-folding:

const uint32_t v0x = (uint8_t)(src0      );
const uint32_t v0y = (uint8_t)(src0 >>  8);
const uint32_t v0z = (uint8_t)(src0 >> 16);
const uint32_t v0w = (uint8_t)(src0 >> 24);
const uint32_t v1x = (uint8_t)(src1      );
const uint32_t v1y = (uint8_t)(src1 >>  8);
const uint32_t v1z = (uint8_t)(src1 >> 16);
const uint32_t v1w = (uint8_t)(src1 >> 24);

dst = (v0x * v1x) + (v0y * v1y) + (v0z * v1z) + (v0w * v1w) + src2;

Builder function:

nir_ssa_def *nir_udot_4x8_uadd(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1, nir_ssa_def *src2)
sudot_4x8_iadd(uint32[N] src0, uint32[N] src1, int32[N] src2)int32[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Constant-folding:

const int32_t v0x = (int8_t)(src0      );
const int32_t v0y = (int8_t)(src0 >>  8);
const int32_t v0z = (int8_t)(src0 >> 16);
const int32_t v0w = (int8_t)(src0 >> 24);
const uint32_t v1x = (uint8_t)(src1      );
const uint32_t v1y = (uint8_t)(src1 >>  8);
const uint32_t v1z = (uint8_t)(src1 >> 16);
const uint32_t v1w = (uint8_t)(src1 >> 24);

dst = (v0x * v1x) + (v0y * v1y) + (v0z * v1z) + (v0w * v1w) + src2;

Builder function:

nir_ssa_def *nir_sudot_4x8_iadd(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1, nir_ssa_def *src2)
sdot_4x8_iadd_sat(uint32[N] src0, uint32[N] src1, int32[N] src2)int32[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

Y

Constant-folding:

const int64_t v0x = (int8_t)(src0      );
const int64_t v0y = (int8_t)(src0 >>  8);
const int64_t v0z = (int8_t)(src0 >> 16);
const int64_t v0w = (int8_t)(src0 >> 24);
const int64_t v1x = (int8_t)(src1      );
const int64_t v1y = (int8_t)(src1 >>  8);
const int64_t v1z = (int8_t)(src1 >> 16);
const int64_t v1w = (int8_t)(src1 >> 24);

const int64_t tmp = (v0x * v1x) + (v0y * v1y) + (v0z * v1z) + (v0w * v1w) + src2;

dst = tmp >= INT32_MAX ? INT32_MAX : (tmp <= INT32_MIN ? INT32_MIN : tmp);

Builder function:

nir_ssa_def *nir_sdot_4x8_iadd_sat(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1, nir_ssa_def *src2)
udot_4x8_uadd_sat(uint32[N] src0, uint32[N] src1, int32[N] src2)int32[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

Y

Constant-folding:

const uint64_t v0x = (uint8_t)(src0      );
const uint64_t v0y = (uint8_t)(src0 >>  8);
const uint64_t v0z = (uint8_t)(src0 >> 16);
const uint64_t v0w = (uint8_t)(src0 >> 24);
const uint64_t v1x = (uint8_t)(src1      );
const uint64_t v1y = (uint8_t)(src1 >>  8);
const uint64_t v1z = (uint8_t)(src1 >> 16);
const uint64_t v1w = (uint8_t)(src1 >> 24);

const uint64_t tmp = (v0x * v1x) + (v0y * v1y) + (v0z * v1z) + (v0w * v1w) + src2;

dst = tmp >= UINT32_MAX ? UINT32_MAX : tmp;

Builder function:

nir_ssa_def *nir_udot_4x8_uadd_sat(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1, nir_ssa_def *src2)
sudot_4x8_iadd_sat(uint32[N] src0, uint32[N] src1, int32[N] src2)int32[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Constant-folding:

const int64_t v0x = (int8_t)(src0      );
const int64_t v0y = (int8_t)(src0 >>  8);
const int64_t v0z = (int8_t)(src0 >> 16);
const int64_t v0w = (int8_t)(src0 >> 24);
const uint64_t v1x = (uint8_t)(src1      );
const uint64_t v1y = (uint8_t)(src1 >>  8);
const uint64_t v1z = (uint8_t)(src1 >> 16);
const uint64_t v1w = (uint8_t)(src1 >> 24);

const int64_t tmp = (v0x * v1x) + (v0y * v1y) + (v0z * v1z) + (v0w * v1w) + src2;

dst = tmp >= INT32_MAX ? INT32_MAX : (tmp <= INT32_MIN ? INT32_MIN : tmp);

Builder function:

nir_ssa_def *nir_sudot_4x8_iadd_sat(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1, nir_ssa_def *src2)
sdot_2x16_iadd(uint32[N] src0, uint32[N] src1, int32[N] src2)int32[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

Y

Constant-folding:

const int32_t v0x = (int16_t)(src0      );
const int32_t v0y = (int16_t)(src0 >> 16);
const int32_t v1x = (int16_t)(src1      );
const int32_t v1y = (int16_t)(src1 >> 16);

dst = (v0x * v1x) + (v0y * v1y) + src2;

Builder function:

nir_ssa_def *nir_sdot_2x16_iadd(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1, nir_ssa_def *src2)
udot_2x16_uadd(uint32[N] src0, uint32[N] src1, uint32[N] src2)uint32[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

Y

Constant-folding:

const uint32_t v0x = (uint16_t)(src0      );
const uint32_t v0y = (uint16_t)(src0 >> 16);
const uint32_t v1x = (uint16_t)(src1      );
const uint32_t v1y = (uint16_t)(src1 >> 16);

dst = (v0x * v1x) + (v0y * v1y) + src2;

Builder function:

nir_ssa_def *nir_udot_2x16_uadd(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1, nir_ssa_def *src2)
sdot_2x16_iadd_sat(uint32[N] src0, uint32[N] src1, int32[N] src2)int32[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

Y

Constant-folding:

const int64_t v0x = (int16_t)(src0      );
const int64_t v0y = (int16_t)(src0 >> 16);
const int64_t v1x = (int16_t)(src1      );
const int64_t v1y = (int16_t)(src1 >> 16);

const int64_t tmp = (v0x * v1x) + (v0y * v1y) + src2;

dst = tmp >= INT32_MAX ? INT32_MAX : (tmp <= INT32_MIN ? INT32_MIN : tmp);

Builder function:

nir_ssa_def *nir_sdot_2x16_iadd_sat(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1, nir_ssa_def *src2)
udot_2x16_uadd_sat(uint32[N] src0, uint32[N] src1, int32[N] src2)int32[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

Y

Constant-folding:

const uint64_t v0x = (uint16_t)(src0      );
const uint64_t v0y = (uint16_t)(src0 >> 16);
const uint64_t v1x = (uint16_t)(src1      );
const uint64_t v1y = (uint16_t)(src1 >> 16);

const uint64_t tmp = (v0x * v1x) + (v0y * v1y) + src2;

dst = tmp >= UINT32_MAX ? UINT32_MAX : tmp;

Builder function:

nir_ssa_def *nir_udot_2x16_uadd_sat(nir_builder*, nir_ssa_def *src0, nir_ssa_def *src1, nir_ssa_def *src2)