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 commutativity. 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
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.

nir_op_algebraic_property algebraic_properties

Algebraic properties of this opcode

bool is_conversion

Whether this represents a numeric conversion opcode

extern const nir_op_info nir_op_infos[nir_num_opcodes]

Metadata for each nir_op, indexed by opcode

struct nir_alu_instr
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.

uint32_t fp_fast_math

The float controls bit float_controls2 cares about. That is, NAN/INF/SIGNED_ZERO_PRESERVE only. Allow{Contract,Reassoc,Transform} are still handled through the exact bit, and the other float controls bits (rounding mode and denorm handling) remain in the execution mode only.

nir_def def

Destination

nir_alu_src src[]

Sources

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

struct nir_alu_src
nir_src src

Base source

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.”

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_def *nir_mov(nir_builder*, nir_def *src0)
ineg(int[N] src0) int[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Constant-folding:

src0 == u_intN_min(bit_size) ? src0 : -src0

Builder function:

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

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Constant-folding:

-src0

Builder function:

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

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Description: Invert every bit of the integer

Constant-folding:

~src0

Builder function:

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

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Description: Roughly implements the OpenGL / Vulkan rules for sign(float). The GLSL.std.450 FSign instruction is defined as:

Result is 1.0 if x > 0, 0.0 if x = 0, or -1.0 if x < 0.

If the source is equal to zero, there is a preference for the result to have the same sign, but this is not required (it is required by OpenCL). If the source is not a number, there is a preference for the result to be +0.0, but this is not required (it is required by OpenCL). If the source is not a number, and the result is not +0.0, the result should definitely not be NaN.

The values returned for constant folding match the behavior required by OpenCL.

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_def *nir_fsign(nir_builder*, nir_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_def *nir_isign(nir_builder*, nir_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_def *nir_iabs(nir_builder*, nir_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_def *nir_fabs(nir_builder*, nir_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_def *nir_fsat(nir_builder*, nir_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_def *nir_frcp(nir_builder*, nir_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_def *nir_frsq(nir_builder*, nir_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_def *nir_fsqrt(nir_builder*, nir_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_def *nir_fexp2(nir_builder*, nir_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_def *nir_flog2(nir_builder*, nir_def *src0)
i2f16(int[N] src0) float16[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Constant-folding:

src0

Builder function:

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

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Constant-folding:

src0

Builder function:

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

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Constant-folding:

src0

Builder function:

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

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Constant-folding:

src0

Builder function:

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

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Constant-folding:

src0

Builder function:

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

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Constant-folding:

src0

Builder function:

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

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Constant-folding:

src0

Builder function:

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

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Constant-folding:

src0

Builder function:

nir_def *nir_i2i64(nir_builder*, nir_def *src0)
u2f16(uint[N] src0) float16[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Constant-folding:

src0

Builder function:

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

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Constant-folding:

src0

Builder function:

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

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Constant-folding:

src0

Builder function:

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

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Constant-folding:

src0

Builder function:

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

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Constant-folding:

src0

Builder function:

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

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Constant-folding:

src0

Builder function:

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

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Constant-folding:

src0

Builder function:

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

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Constant-folding:

src0

Builder function:

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

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Constant-folding:

src0

Builder function:

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

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Constant-folding:

src0

Builder function:

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

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Constant-folding:

src0

Builder function:

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

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Constant-folding:

src0

Builder function:

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

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Constant-folding:

src0

Builder function:

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

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Constant-folding:

src0

Builder function:

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

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Constant-folding:

src0

Builder function:

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

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Constant-folding:

src0

Builder function:

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

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Constant-folding:

src0

Builder function:

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

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Constant-folding:

src0

Builder function:

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

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Constant-folding:

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

Builder function:

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

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Constant-folding:

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

Builder function:

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

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Constant-folding:

if (bit_size > 32) {
   if (nir_is_rounding_mode_rtz(execution_mode, 16))
      dst = _mesa_half_to_float(_mesa_double_to_float16_rtz(src0));
   else
      dst = _mesa_half_to_float(_mesa_double_to_float16_rtne(src0));
} else if (bit_size > 16) {
   if (nir_is_rounding_mode_rtz(execution_mode, 16))
      dst = _mesa_half_to_float(_mesa_float_to_float16_rtz(src0));
   else
      dst = _mesa_half_to_float(_mesa_float_to_float16_rtne(src0));
} else {
   dst = src0;
}

Builder function:

nir_def *nir_f2f16(nir_builder*, nir_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_def *nir_f2f32(nir_builder*, nir_def *src0)
f2f64(float[N] src0) float64[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Constant-folding:

src0

Builder function:

nir_def *nir_f2f64(nir_builder*, nir_def *src0)
b2f16(bool[N] src0) float16[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Constant-folding:

src0

Builder function:

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

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Constant-folding:

src0

Builder function:

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

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Constant-folding:

src0

Builder function:

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

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Constant-folding:

src0

Builder function:

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

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Constant-folding:

src0

Builder function:

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

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Constant-folding:

src0

Builder function:

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

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Constant-folding:

src0

Builder function:

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

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Constant-folding:

src0

Builder function:

nir_def *nir_b2i64(nir_builder*, nir_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_def *nir_b2b1(nir_builder*, nir_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_def *nir_b2b8(nir_builder*, nir_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_def *nir_b2b16(nir_builder*, nir_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_def *nir_b2b32(nir_builder*, nir_def *src0)
f2fmp(float32[N] src0) float16[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Description: Special opcode that is the same as f2f16 except that it is safe to remove it if the result is immediately converted back to 32 bits again. This is generated as part of the precision lowering pass. mp stands for medium precision.

Constant-folding:

if (bit_size > 32) {
   if (nir_is_rounding_mode_rtz(execution_mode, 16))
      dst = _mesa_half_to_float(_mesa_double_to_float16_rtz(src0));
   else
      dst = _mesa_half_to_float(_mesa_double_to_float16_rtne(src0));
} else if (bit_size > 16) {
   if (nir_is_rounding_mode_rtz(execution_mode, 16))
      dst = _mesa_half_to_float(_mesa_float_to_float16_rtz(src0));
   else
      dst = _mesa_half_to_float(_mesa_float_to_float16_rtne(src0));
} else {
   dst = src0;
}

Builder function:

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

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Description: Special opcode that is the same as i2i16 except that it is safe to remove it if the result is immediately converted back to 32 bits again. This is generated as part of the precision lowering pass. mp stands for medium precision.

Constant-folding:

src0

Builder function:

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

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Description: Special opcode that is the same as f2i16 except that it is safe to remove it if the result is immediately converted back to 32 bits again. This is generated as part of the precision lowering pass. mp stands for medium precision.

Constant-folding:

src0

Builder function:

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

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Description: Special opcode that is the same as f2u16 except that it is safe to remove it if the result is immediately converted back to 32 bits again. This is generated as part of the precision lowering pass. mp stands for medium precision.

Constant-folding:

src0

Builder function:

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

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Description: Special opcode that is the same as i2f16 except that it is safe to remove it if the result is immediately converted back to 32 bits again. This is generated as part of the precision lowering pass. mp stands for medium precision.

Constant-folding:

src0

Builder function:

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

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Description: Special opcode that is the same as u2f16 except that it is safe to remove it if the result is immediately converted back to 32 bits again. This is generated as part of the precision lowering pass. mp stands for medium precision.

Constant-folding:

src0

Builder function:

nir_def *nir_u2fmp(nir_builder*, nir_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_def *nir_ftrunc(nir_builder*, nir_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_def *nir_fceil(nir_builder*, nir_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_def *nir_ffloor(nir_builder*, nir_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_def *nir_ffract(nir_builder*, nir_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_def *nir_fround_even(nir_builder*, nir_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_def *nir_fquantize2f16(nir_builder*, nir_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_def *nir_fsin(nir_builder*, nir_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_def *nir_fcos(nir_builder*, nir_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_def *nir_frexp_exp(nir_builder*, nir_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_def *nir_frexp_sig(nir_builder*, nir_def *src0)
fddx(float[N] src0) float[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Description: Calculate the screen-space partial derivative using either fine or coarse derivatives of the input with respect to the X-axis. The constant folding is trivial as the derivative of a constant is 0 if the constant is not Inf or NaN.

Constant-folding:

isfinite(src0) ? 0.0 : NAN

Builder function:

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

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Description: Calculate the screen-space partial derivative using either fine or coarse derivatives of the input with respect to the Y-axis. The constant folding is trivial as the derivative of a constant is 0 if the constant is not Inf or NaN.

Constant-folding:

isfinite(src0) ? 0.0 : NAN

Builder function:

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

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Description: Calculate the screen-space partial derivative using fine derivatives of the input with respect to the X-axis. The constant folding is trivial as the derivative of a constant is 0 if the constant is not Inf or NaN.

Constant-folding:

isfinite(src0) ? 0.0 : NAN

Builder function:

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

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Description: Calculate the screen-space partial derivative using fine derivatives of the input with respect to the Y-axis. The constant folding is trivial as the derivative of a constant is 0 if the constant is not Inf or NaN.

Constant-folding:

isfinite(src0) ? 0.0 : NAN

Builder function:

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

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Description: Calculate the screen-space partial derivative using coarse derivatives of the input with respect to the X-axis. The constant folding is trivial as the derivative of a constant is 0 if the constant is not Inf or NaN.

Constant-folding:

isfinite(src0) ? 0.0 : NAN

Builder function:

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

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Description: Calculate the screen-space partial derivative using coarse derivatives of the input with respect to the Y-axis. The constant folding is trivial as the derivative of a constant is 0 if the constant is not Inf or NaN.

Constant-folding:

isfinite(src0) ? 0.0 : NAN

Builder function:

nir_def *nir_fddy_coarse(nir_builder*, nir_def *src0)
pack_snorm_2x16(float[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_def *nir_pack_snorm_2x16(nir_builder*, nir_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_def *nir_pack_snorm_4x8(nir_builder*, nir_def *src0)
pack_unorm_2x16(float[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_def *nir_pack_unorm_2x16(nir_builder*, nir_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_def *nir_pack_unorm_4x8(nir_builder*, nir_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_def *nir_pack_half_2x16(nir_builder*, nir_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_def *nir_unpack_snorm_2x16(nir_builder*, nir_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_def *nir_unpack_snorm_4x8(nir_builder*, nir_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_def *nir_unpack_unorm_2x16(nir_builder*, nir_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_def *nir_unpack_unorm_4x8(nir_builder*, nir_def *src0)
pack_uint_2x16(uint32[2] src0) uint32[1]

Properties:

Per-component

Associative

2-src commutative

N

N

N

Description: Convert two unsigned integers into a packed unsigned short (clamp is applied).

Constant-folding:

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

Builder function:

nir_def *nir_pack_uint_2x16(nir_builder*, nir_def *src0)
pack_sint_2x16(int32[2] src0) int32[1]

Properties:

Per-component

Associative

2-src commutative

N

N

N

Description: Convert two signed integers into a packed signed short (clamp is applied).

Constant-folding:

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

Builder function:

nir_def *nir_pack_sint_2x16(nir_builder*, nir_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_def *nir_pack_uvec2_to_uint(nir_builder*, nir_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_def *nir_pack_uvec4_to_uint(nir_builder*, nir_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_def *nir_pack_32_4x8(nir_builder*, nir_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_def *nir_pack_32_2x16(nir_builder*, nir_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_def *nir_pack_64_2x32(nir_builder*, nir_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_def *nir_pack_64_4x16(nir_builder*, nir_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_def *nir_unpack_64_2x32(nir_builder*, nir_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.x >> 48;

Builder function:

nir_def *nir_unpack_64_4x16(nir_builder*, nir_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_def *nir_unpack_32_2x16(nir_builder*, nir_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_def *nir_unpack_32_4x8(nir_builder*, nir_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), nir_is_denorm_flush_to_zero(execution_mode, 16));
dst.y = unpack_half_1x16((uint16_t)(src0.x >> 16), nir_is_denorm_flush_to_zero(execution_mode, 16));

Builder function:

nir_def *nir_unpack_half_2x16(nir_builder*, nir_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), nir_is_denorm_flush_to_zero(execution_mode, 16))

Builder function:

nir_def *nir_unpack_half_2x16_split_x(nir_builder*, nir_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), nir_is_denorm_flush_to_zero(execution_mode, 16))

Builder function:

nir_def *nir_unpack_half_2x16_split_y(nir_builder*, nir_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_def *nir_unpack_32_2x16_split_x(nir_builder*, nir_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_def *nir_unpack_32_2x16_split_y(nir_builder*, nir_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_def *nir_unpack_64_2x32_split_x(nir_builder*, nir_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_def *nir_unpack_64_2x32_split_y(nir_builder*, nir_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_def *nir_bitfield_reverse(nir_builder*, nir_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_def *nir_bit_count(nir_builder*, nir_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_def *nir_ufind_msb(nir_builder*, nir_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_def *nir_ufind_msb_rev(nir_builder*, nir_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)(bit_size - bit - 1);

Builder function:

nir_def *nir_uclz(nir_builder*, nir_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 = bit_size - 1; 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_def *nir_ifind_msb(nir_builder*, nir_def *src0)
ifind_msb_rev(int32[N] src0) int32[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Constant-folding:

dst = -1;
/* We are looking for the highest bit that's not the same as the sign bit. */
uint32_t sign = src0 & 0x80000000u;
for (int bit = 0; bit < 32; bit++) {
   if (((src0 << bit) & 0x80000000u) != sign) {
      dst = bit;
      break;
   }
}

Builder function:

nir_def *nir_ifind_msb_rev(nir_builder*, nir_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_def *nir_find_lsb(nir_builder*, nir_def *src0)
fsum2(float[2] src0) float[1]

Properties:

Per-component

Associative

2-src commutative

N

N

N

Description: Sum of vector components

Constant-folding:

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

Builder function:

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

Properties:

Per-component

Associative

2-src commutative

N

N

N

Description: Sum of vector components

Constant-folding:

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

Builder function:

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

Properties:

Per-component

Associative

2-src commutative

N

N

N

Description: Sum of vector components

Constant-folding:

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

Builder function:

nir_def *nir_fsum4(nir_builder*, nir_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_def *nir_fadd(nir_builder*, nir_def *src0, nir_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_def *nir_iadd(nir_builder*, nir_def *src0, nir_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_def *nir_iadd_sat(nir_builder*, nir_def *src0, nir_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_def *nir_uadd_sat(nir_builder*, nir_def *src0, nir_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_def *nir_isub_sat(nir_builder*, nir_def *src0, nir_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_def *nir_usub_sat(nir_builder*, nir_def *src0, nir_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_def *nir_fsub(nir_builder*, nir_def *src0, nir_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_def *nir_isub(nir_builder*, nir_def *src0, nir_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_def *nir_uabs_isub(nir_builder*, nir_def *src0, nir_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_def *nir_uabs_usub(nir_builder*, nir_def *src0, nir_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_def *nir_fmul(nir_builder*, nir_def *src0, nir_def *src1)
fmulz(float32[N] src0, float32[N] src1) float32[N]

Properties:

Per-component

Associative

2-src commutative

Y

Y

Y

Description: Unlike fmul, anything (even infinity or NaN) multiplied by zero is always zero. fmulz(0.0, inf) and fmulz(0.0, nan) must be +/-0.0, even if INF_PRESERVE/NAN_PRESERVE is not used. If SIGNED_ZERO_PRESERVE is used, then the result must be a positive zero if either operand is zero.

Constant-folding:

if (src0 == 0.0 || src1 == 0.0)
   dst = 0.0;
else if (nir_is_rounding_mode_rtz(execution_mode, 32))
   dst = _mesa_double_to_float_rtz((double)src0 * (double)src1);
else
   dst = src0 * src1;

Builder function:

nir_def *nir_fmulz(nir_builder*, nir_def *src0, nir_def *src1)
imul(int[N] src0, int[N] src1) int[N]

Properties:

Per-component

Associative

2-src commutative

Y

Y

Y

Description: Low 32-bits of signed/unsigned integer multiply

Constant-folding:

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

Builder function:

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

Properties:

Per-component

Associative

2-src commutative

Y

N

Y

Description: Multiply signed 32-bit integers, 64-bit result

Constant-folding:

(int64_t)src0 * (int64_t)src1

Builder function:

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

Properties:

Per-component

Associative

2-src commutative

Y

N

Y

Description: Multiply unsigned 32-bit integers, 64-bit result

Constant-folding:

(uint64_t)src0 * (uint64_t)src1

Builder function:

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

Properties:

Per-component

Associative

2-src commutative

Y

N

Y

Description: High 32-bits of signed integer multiply

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_def *nir_imul_high(nir_builder*, nir_def *src0, nir_def *src1)
umul_high(uint[N] src0, uint[N] src1) uint[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

Y

Description: High 32-bits of unsigned integer multiply

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_def *nir_umul_high(nir_builder*, nir_def *src0, nir_def *src1)
umul_low(uint32[N] src0, uint32[N] src1) uint32[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

Y

Description: Low 32-bits of unsigned integer multiply

Constant-folding:

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

Builder function:

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

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Description: Multiply 32-bits with low 16-bits, with sign extension

Constant-folding:

src0 * (int16_t) src1

Builder function:

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

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Description: Multiply 32-bits with low 16-bits, with zero extension

Constant-folding:

src0 * (uint16_t) src1

Builder function:

nir_def *nir_umul_32x16(nir_builder*, nir_def *src0, nir_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_def *nir_fdiv(nir_builder*, nir_def *src0, nir_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_def *nir_idiv(nir_builder*, nir_def *src0, nir_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_def *nir_udiv(nir_builder*, nir_def *src0, nir_def *src1)
uadd_carry(uint[N] src0, uint[N] src1) uint[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

Y

Description: Return an integer (1 or 0) representing the carry resulting from the addition of the two unsigned arguments.

Constant-folding:

src0 + src1 < src0

Builder function:

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

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Description: Return an integer (1 or 0) representing the borrow resulting from the subtraction of the two unsigned arguments.

Constant-folding:

src0 < src1

Builder function:

nir_def *nir_usub_borrow(nir_builder*, nir_def *src0, nir_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_def *nir_ihadd(nir_builder*, nir_def *src0, nir_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_def *nir_uhadd(nir_builder*, nir_def *src0, nir_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_def *nir_irhadd(nir_builder*, nir_def *src0, nir_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_def *nir_urhadd(nir_builder*, nir_def *src0, nir_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_def *nir_umod(nir_builder*, nir_def *src0, nir_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_def *nir_irem(nir_builder*, nir_def *src0, nir_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_def *nir_imod(nir_builder*, nir_def *src0, nir_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_def *nir_fmod(nir_builder*, nir_def *src0, nir_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_def *nir_frem(nir_builder*, nir_def *src0, nir_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_def *nir_flt(nir_builder*, nir_def *src0, nir_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_def *nir_flt8(nir_builder*, nir_def *src0, nir_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_def *nir_flt16(nir_builder*, nir_def *src0, nir_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_def *nir_flt32(nir_builder*, nir_def *src0, nir_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_def *nir_fge(nir_builder*, nir_def *src0, nir_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_def *nir_fge8(nir_builder*, nir_def *src0, nir_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_def *nir_fge16(nir_builder*, nir_def *src0, nir_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_def *nir_fge32(nir_builder*, nir_def *src0, nir_def *src1)
fltu(float[N] src0, float[N] src1) bool1[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Constant-folding:

isnan(src0) || isnan(src1) || src0 < src1

Builder function:

nir_def *nir_fltu(nir_builder*, nir_def *src0, nir_def *src1)
fltu8(float[N] src0, float[N] src1) bool8[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Constant-folding:

isnan(src0) || isnan(src1) || src0 < src1

Builder function:

nir_def *nir_fltu8(nir_builder*, nir_def *src0, nir_def *src1)
fltu16(float[N] src0, float[N] src1) bool16[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Constant-folding:

isnan(src0) || isnan(src1) || src0 < src1

Builder function:

nir_def *nir_fltu16(nir_builder*, nir_def *src0, nir_def *src1)
fltu32(float[N] src0, float[N] src1) bool32[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Constant-folding:

isnan(src0) || isnan(src1) || src0 < src1

Builder function:

nir_def *nir_fltu32(nir_builder*, nir_def *src0, nir_def *src1)
fgeu(float[N] src0, float[N] src1) bool1[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Constant-folding:

isnan(src0) || isnan(src1) || src0 >= src1

Builder function:

nir_def *nir_fgeu(nir_builder*, nir_def *src0, nir_def *src1)
fgeu8(float[N] src0, float[N] src1) bool8[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Constant-folding:

isnan(src0) || isnan(src1) || src0 >= src1

Builder function:

nir_def *nir_fgeu8(nir_builder*, nir_def *src0, nir_def *src1)
fgeu16(float[N] src0, float[N] src1) bool16[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Constant-folding:

isnan(src0) || isnan(src1) || src0 >= src1

Builder function:

nir_def *nir_fgeu16(nir_builder*, nir_def *src0, nir_def *src1)
fgeu32(float[N] src0, float[N] src1) bool32[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Constant-folding:

isnan(src0) || isnan(src1) || src0 >= src1

Builder function:

nir_def *nir_fgeu32(nir_builder*, nir_def *src0, nir_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_def *nir_feq(nir_builder*, nir_def *src0, nir_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_def *nir_feq8(nir_builder*, nir_def *src0, nir_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_def *nir_feq16(nir_builder*, nir_def *src0, nir_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_def *nir_feq32(nir_builder*, nir_def *src0, nir_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_def *nir_fneu(nir_builder*, nir_def *src0, nir_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_def *nir_fneu8(nir_builder*, nir_def *src0, nir_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_def *nir_fneu16(nir_builder*, nir_def *src0, nir_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_def *nir_fneu32(nir_builder*, nir_def *src0, nir_def *src1)
fequ(float[N] src0, float[N] src1) bool1[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

Y

Constant-folding:

isnan(src0) || isnan(src1) || src0 == src1

Builder function:

nir_def *nir_fequ(nir_builder*, nir_def *src0, nir_def *src1)
fequ8(float[N] src0, float[N] src1) bool8[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

Y

Constant-folding:

isnan(src0) || isnan(src1) || src0 == src1

Builder function:

nir_def *nir_fequ8(nir_builder*, nir_def *src0, nir_def *src1)
fequ16(float[N] src0, float[N] src1) bool16[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

Y

Constant-folding:

isnan(src0) || isnan(src1) || src0 == src1

Builder function:

nir_def *nir_fequ16(nir_builder*, nir_def *src0, nir_def *src1)
fequ32(float[N] src0, float[N] src1) bool32[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

Y

Constant-folding:

isnan(src0) || isnan(src1) || src0 == src1

Builder function:

nir_def *nir_fequ32(nir_builder*, nir_def *src0, nir_def *src1)
fneo(float[N] src0, float[N] src1) bool1[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

Y

Constant-folding:

!isnan(src0) && !isnan(src1) && src0 != src1

Builder function:

nir_def *nir_fneo(nir_builder*, nir_def *src0, nir_def *src1)
fneo8(float[N] src0, float[N] src1) bool8[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

Y

Constant-folding:

!isnan(src0) && !isnan(src1) && src0 != src1

Builder function:

nir_def *nir_fneo8(nir_builder*, nir_def *src0, nir_def *src1)
fneo16(float[N] src0, float[N] src1) bool16[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

Y

Constant-folding:

!isnan(src0) && !isnan(src1) && src0 != src1

Builder function:

nir_def *nir_fneo16(nir_builder*, nir_def *src0, nir_def *src1)
fneo32(float[N] src0, float[N] src1) bool32[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

Y

Constant-folding:

!isnan(src0) && !isnan(src1) && src0 != src1

Builder function:

nir_def *nir_fneo32(nir_builder*, nir_def *src0, nir_def *src1)
funord(float[N] src0, float[N] src1) bool1[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

Y

Constant-folding:

isnan(src0) || isnan(src1)

Builder function:

nir_def *nir_funord(nir_builder*, nir_def *src0, nir_def *src1)
funord8(float[N] src0, float[N] src1) bool8[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

Y

Constant-folding:

isnan(src0) || isnan(src1)

Builder function:

nir_def *nir_funord8(nir_builder*, nir_def *src0, nir_def *src1)
funord16(float[N] src0, float[N] src1) bool16[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

Y

Constant-folding:

isnan(src0) || isnan(src1)

Builder function:

nir_def *nir_funord16(nir_builder*, nir_def *src0, nir_def *src1)
funord32(float[N] src0, float[N] src1) bool32[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

Y

Constant-folding:

isnan(src0) || isnan(src1)

Builder function:

nir_def *nir_funord32(nir_builder*, nir_def *src0, nir_def *src1)
ford(float[N] src0, float[N] src1) bool1[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

Y

Constant-folding:

!isnan(src0) && !isnan(src1)

Builder function:

nir_def *nir_ford(nir_builder*, nir_def *src0, nir_def *src1)
ford8(float[N] src0, float[N] src1) bool8[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

Y

Constant-folding:

!isnan(src0) && !isnan(src1)

Builder function:

nir_def *nir_ford8(nir_builder*, nir_def *src0, nir_def *src1)
ford16(float[N] src0, float[N] src1) bool16[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

Y

Constant-folding:

!isnan(src0) && !isnan(src1)

Builder function:

nir_def *nir_ford16(nir_builder*, nir_def *src0, nir_def *src1)
ford32(float[N] src0, float[N] src1) bool32[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

Y

Constant-folding:

!isnan(src0) && !isnan(src1)

Builder function:

nir_def *nir_ford32(nir_builder*, nir_def *src0, nir_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_def *nir_ilt(nir_builder*, nir_def *src0, nir_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_def *nir_ilt8(nir_builder*, nir_def *src0, nir_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_def *nir_ilt16(nir_builder*, nir_def *src0, nir_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_def *nir_ilt32(nir_builder*, nir_def *src0, nir_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_def *nir_ige(nir_builder*, nir_def *src0, nir_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_def *nir_ige8(nir_builder*, nir_def *src0, nir_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_def *nir_ige16(nir_builder*, nir_def *src0, nir_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_def *nir_ige32(nir_builder*, nir_def *src0, nir_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_def *nir_ieq(nir_builder*, nir_def *src0, nir_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_def *nir_ieq8(nir_builder*, nir_def *src0, nir_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_def *nir_ieq16(nir_builder*, nir_def *src0, nir_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_def *nir_ieq32(nir_builder*, nir_def *src0, nir_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_def *nir_ine(nir_builder*, nir_def *src0, nir_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_def *nir_ine8(nir_builder*, nir_def *src0, nir_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_def *nir_ine16(nir_builder*, nir_def *src0, nir_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_def *nir_ine32(nir_builder*, nir_def *src0, nir_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_def *nir_ult(nir_builder*, nir_def *src0, nir_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_def *nir_ult8(nir_builder*, nir_def *src0, nir_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_def *nir_ult16(nir_builder*, nir_def *src0, nir_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_def *nir_ult32(nir_builder*, nir_def *src0, nir_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_def *nir_uge(nir_builder*, nir_def *src0, nir_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_def *nir_uge8(nir_builder*, nir_def *src0, nir_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_def *nir_uge16(nir_builder*, nir_def *src0, nir_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_def *nir_uge32(nir_builder*, nir_def *src0, nir_def *src1)
bitnz(uint[N] src0, uint32[N] src1) bool1[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Description: only uses the least significant bits like SM5 shifts

Constant-folding:

((uint64_t)src0 >> (src1 & (bit_size - 1)) & 0x1) == 0x1

Builder function:

nir_def *nir_bitnz(nir_builder*, nir_def *src0, nir_def *src1)
bitnz8(uint[N] src0, uint32[N] src1) bool8[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Description: only uses the least significant bits like SM5 shifts

Constant-folding:

((uint64_t)src0 >> (src1 & (bit_size - 1)) & 0x1) == 0x1

Builder function:

nir_def *nir_bitnz8(nir_builder*, nir_def *src0, nir_def *src1)
bitnz16(uint[N] src0, uint32[N] src1) bool16[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Description: only uses the least significant bits like SM5 shifts

Constant-folding:

((uint64_t)src0 >> (src1 & (bit_size - 1)) & 0x1) == 0x1

Builder function:

nir_def *nir_bitnz16(nir_builder*, nir_def *src0, nir_def *src1)
bitnz32(uint[N] src0, uint32[N] src1) bool32[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Description: only uses the least significant bits like SM5 shifts

Constant-folding:

((uint64_t)src0 >> (src1 & (bit_size - 1)) & 0x1) == 0x1

Builder function:

nir_def *nir_bitnz32(nir_builder*, nir_def *src0, nir_def *src1)
bitz(uint[N] src0, uint32[N] src1) bool1[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Description: only uses the least significant bits like SM5 shifts

Constant-folding:

((uint64_t)src0 >> (src1 & (bit_size - 1)) & 0x1) == 0x0

Builder function:

nir_def *nir_bitz(nir_builder*, nir_def *src0, nir_def *src1)
bitz8(uint[N] src0, uint32[N] src1) bool8[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Description: only uses the least significant bits like SM5 shifts

Constant-folding:

((uint64_t)src0 >> (src1 & (bit_size - 1)) & 0x1) == 0x0

Builder function:

nir_def *nir_bitz8(nir_builder*, nir_def *src0, nir_def *src1)
bitz16(uint[N] src0, uint32[N] src1) bool16[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Description: only uses the least significant bits like SM5 shifts

Constant-folding:

((uint64_t)src0 >> (src1 & (bit_size - 1)) & 0x1) == 0x0

Builder function:

nir_def *nir_bitz16(nir_builder*, nir_def *src0, nir_def *src1)
bitz32(uint[N] src0, uint32[N] src1) bool32[N]

Properties:

Per-component

Associative

2-src commutative

Y

N

N

Description: only uses the least significant bits like SM5 shifts

Constant-folding:

((uint64_t)src0 >> (src1 & (bit_size - 1)) & 0x1) == 0x0

Builder function:

nir_def *nir_bitz32(nir_builder*, nir_def *src0, nir_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_def *nir_ball_fequal2(nir_builder*, nir_def *src0, nir_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_def *nir_ball_fequal4(nir_builder*, nir_def *src0, nir_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_def *nir_ball_fequal8(nir_builder*, nir_def *src0, nir_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_def *nir_ball_fequal16(nir_builder*, nir_def *src0, nir_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_def *nir_ball_fequal3(nir_builder*, nir_def *src0, nir_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_def *nir_ball_fequal5(nir_builder*, nir_def *src0, nir_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_def *nir_b8all_fequal2(nir_builder*, nir_def *src0, nir_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_def *nir_b8all_fequal4(nir_builder*, nir_def *src0, nir_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_def *nir_b8all_fequal8(nir_builder*, nir_def *src0, nir_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_def *nir_b8all_fequal16(nir_builder*, nir_def *src0, nir_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_def *nir_b8all_fequal3(nir_builder*, nir_def *src0, nir_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_def *nir_b8all_fequal5(nir_builder*, nir_def *src0, nir_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_def *nir_b16all_fequal2(nir_builder*, nir_def *src0, nir_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_def *nir_b16all_fequal4(nir_builder*, nir_def *src0, nir_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_def *nir_b16all_fequal8(nir_builder*, nir_def *src0, nir_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_def *nir_b16all_fequal16(nir_builder*, nir_def *src0, nir_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_def *nir_b16all_fequal3(nir_builder*, nir_def *src0, nir_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_def *nir_b16all_fequal5(nir_builder*, nir_def *src0, nir_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_def *nir_b32all_fequal2(nir_builder*, nir_def *src0, nir_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_def *nir_b32all_fequal4(nir_builder*, nir_def *src0, nir_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_def *nir_b32all_fequal8(nir_builder*, nir_def *src0, nir_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_def *nir_b32all_fequal16(nir_builder*, nir_def *src0, nir_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_def *nir_b32all_fequal3(nir_builder*, nir_def *src0, nir_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_def *nir_b32all_fequal5(nir_builder*, nir_def *src0, nir_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_def *nir_bany_fnequal2(nir_builder*, nir_def *src0, nir_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_def *nir_bany_fnequal4(nir_builder*, nir_def *src0, nir_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_def *nir_bany_fnequal8(nir_builder*, nir_def *src0, nir_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_def *nir_bany_fnequal16(nir_builder*, nir_def *src0, nir_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_def *nir_bany_fnequal3(nir_builder*, nir_def *src0, nir_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_def *nir_bany_fnequal5(nir_builder*, nir_def *src0, nir_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_def *nir_b8any_fnequal2(nir_builder*, nir_def *src0, nir_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_def *nir_b8any_fnequal4(nir_builder*, nir_def *src0, nir_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_def *nir_b8any_fnequal8(nir_builder*, nir_def *src0, nir_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_def *nir_b8any_fnequal16(nir_builder*, nir_def *src0, nir_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_def *nir_b8any_fnequal3(nir_builder*, nir_def *src0, nir_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_def *nir_b8any_fnequal5(nir_builder*, nir_def *src0, nir_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_def *nir_b16any_fnequal2(nir_builder*, nir_def *src0, nir_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_def *nir_b16any_fnequal4(nir_builder*, nir_def *src0, nir_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_def *nir_b16any_fnequal8(nir_builder*, nir_def *src0, nir_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_def *nir_b16any_fnequal16(nir_builder*, nir_def *src0, nir_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_def *nir_b16any_fnequal3(nir_builder*, nir_def *src0, nir_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_def *nir_b16any_fnequal5(nir_builder*, nir_def *src0, nir_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_def *nir_b32any_fnequal2(nir_builder*, nir_def *src0, nir_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_def *nir_b32any_fnequal4(nir_builder*, nir_def *src0, nir_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_def *nir_b32any_fnequal8(nir_builder*, nir_def *src0, nir_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_def *nir_b32any_fnequal16(nir_builder*, nir_def *src0, nir_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_def *nir_b32any_fnequal3(nir_builder*, nir_def *src0, nir_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_def *nir_b32any_fnequal5(nir_builder*, nir_def *src0, nir_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_def *nir_ball_iequal2(nir_builder*, nir_def *src0, nir_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_def *nir_ball_iequal4(nir_builder*, nir_def *src0, nir_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_def *nir_ball_iequal8(nir_builder*, nir_def *src0, nir_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_def *nir_ball_iequal16(nir_builder*, nir_def *src0, nir_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_def *nir_ball_iequal3(nir_builder*, nir_def *src0, nir_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_def *nir_ball_iequal5(nir_builder*, nir_def *src0, nir_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_def *nir_b8all_iequal2(nir_builder*, nir_def *src0, nir_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_def *nir_b8all_iequal4(nir_builder*, nir_def *src0, nir_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_def *nir_b8all_iequal8(nir_builder*, nir_def *src0, nir_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_def *nir_b8all_iequal16(nir_builder*, nir_def *src0, nir_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_def *nir_b8all_iequal3(nir_builder*, nir_def *src0, nir_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_def *nir_b8all_iequal5(nir_builder*, nir_def *src0, nir_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_def *nir_b16all_iequal2(nir_builder*, nir_def *src0, nir_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_def *nir_b16all_iequal4(nir_builder*, nir_def *src0, nir_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_def *nir_b16all_iequal8(nir_builder*, nir_def *src0, nir_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_def *nir_b16all_iequal16(nir_builder*, nir_def *src0, nir_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_def *nir_b16all_iequal3(nir_builder*, nir_def *src0, nir_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_def *nir_b16all_iequal5(nir_builder*, nir_def *src0, nir_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_def *nir_b32all_iequal2(nir_builder*, nir_def *src0, nir_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_def *nir_b32all_iequal4(nir_builder*, nir_def *src0, nir_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_def *nir_b32all_iequal8(nir_builder*, nir_def *src0, nir_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_def *nir_b32all_iequal16(nir_builder*, nir_def *src0, nir_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_def *nir_b32all_iequal3(nir_builder*, nir_def *src0, nir_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_def *nir_b32all_iequal5(nir_builder*, nir_def *src0, nir_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_def *nir_bany_inequal2(nir_builder*, nir_def *src0, nir_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_def *nir_bany_inequal4(nir_builder*, nir_def *src0, nir_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_def *nir_bany_inequal8(nir_builder*, nir_def *src0, nir_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_def *nir_bany_inequal16(nir_builder*, nir_def *src0, nir_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_def *nir_bany_inequal3(nir_builder*, nir_def *src0, nir_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_def *nir_bany_inequal5(nir_builder*, nir_def *src0, nir_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_def *nir_b8any_inequal2(nir_builder*, nir_def *src0, nir_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_def *nir_b8any_inequal4(nir_builder*, nir_def *src0, nir_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_def *nir_b8any_inequal8(nir_builder*, nir_def *src0, nir_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_def *nir_b8any_inequal16(nir_builder*, nir_def *src0, nir_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_def *nir_b8any_inequal3(nir_builder*, nir_def *src0, nir_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_def *nir_b8any_inequal5(nir_builder*, nir_def *src0, nir_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_def *nir_b16any_inequal2(nir_builder*, nir_def *src0, nir_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_def *nir_b16any_inequal4(nir_builder*, nir_def *src0, nir_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_def *nir_b16any_inequal8(nir_builder*, nir_def *src0, nir_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_def *nir_b16any_inequal16(nir_builder*, nir_def *src0, nir_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_def *nir_b16any_inequal3(nir_builder*, nir_def *src0, nir_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_def *nir_b16any_inequal5(nir_builder*, nir_def *src0, nir_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_def *nir_b32any_inequal2(nir_builder*, nir_def *src0, nir_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_def *nir_b32any_inequal4(nir_builder*, nir_def *src0, nir_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_def *nir_b32any_inequal8(nir_builder*, nir_def *src0, nir_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_def *nir_b32any_inequal16(nir_builder*, nir_def *src0, nir_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_def *nir_b32any_inequal3(nir_builder*, nir_def *src0, nir_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_def *nir_b32any_inequal5(nir_builder*, nir_def *src0, nir_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_def *nir_fall_equal2(nir_builder*, nir_def *src0, nir_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_def *nir_fall_equal4(nir_builder*, nir_def *src0, nir_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_def *nir_fall_equal8(nir_builder*, nir_def *src0, nir_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_def *nir_fall_equal16(nir_builder*, nir_def *src0, nir_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_def *nir_fall_equal3(nir_builder*, nir_def *src0, nir_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_def *nir_fall_equal5(nir_builder*, nir_def *src0, nir_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_def *nir_fany_nequal2(nir_builder*, nir_def *src0, nir_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_def *nir_fany_nequal4(nir_builder*, nir_def *src0, nir_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_def *nir_fany_nequal8(nir_builder*, nir_def *src0, nir_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)