return false;
for (unsigned i = 0; i < num_components; i++) {
- switch (nir_op_infos[instr->op].input_types[src]) {
+ nir_alu_type type = nir_op_infos[instr->op].input_types[src];
+ switch (nir_alu_type_get_base_type(type)) {
case nir_type_int: {
int64_t val = nir_src_comp_as_int(instr->src[src].src, swizzle[i]);
if (val <= 0 || !util_is_power_of_two_or_zero64(val))
return false;
for (unsigned i = 0; i < num_components; i++) {
- switch (nir_op_infos[instr->op].input_types[src]) {
+ nir_alu_type type = nir_op_infos[instr->op].input_types[src];
+ switch (nir_alu_type_get_base_type(type)) {
case nir_type_int: {
int64_t val = nir_src_comp_as_int(instr->src[src].src, swizzle[i]);
if (val >= 0 || !util_is_power_of_two_or_zero64(-val))
return true;
for (unsigned i = 0; i < num_components; i++) {
- switch (nir_op_infos[instr->op].input_types[src]) {
+ nir_alu_type type = nir_op_infos[instr->op].input_types[src];
+ switch (nir_alu_type_get_base_type(type)) {
case nir_type_float:
if (nir_src_comp_as_float(instr->src[src].src, swizzle[i]) == 0.0)
return false;