Lines Matching refs:alu
78 opt_undef_vecN(nir_builder *b, nir_alu_instr *alu) in opt_undef_vecN() argument
80 if (alu->op != nir_op_vec2 && in opt_undef_vecN()
81 alu->op != nir_op_vec3 && in opt_undef_vecN()
82 alu->op != nir_op_vec4 && in opt_undef_vecN()
83 alu->op != nir_op_fmov && in opt_undef_vecN()
84 alu->op != nir_op_imov) in opt_undef_vecN()
87 assert(alu->dest.dest.is_ssa); in opt_undef_vecN()
89 for (unsigned i = 0; i < nir_op_infos[alu->op].num_inputs; i++) { in opt_undef_vecN()
90 if (!alu->src[i].src.is_ssa || in opt_undef_vecN()
91 alu->src[i].src.ssa->parent_instr->type != nir_instr_type_ssa_undef) in opt_undef_vecN()
95 b->cursor = nir_before_instr(&alu->instr); in opt_undef_vecN()
96 nir_ssa_def *undef = nir_ssa_undef(b, alu->dest.dest.ssa.num_components, in opt_undef_vecN()
97 nir_dest_bit_size(alu->dest.dest)); in opt_undef_vecN()
98 nir_ssa_def_rewrite_uses(&alu->dest.dest.ssa, nir_src_for_ssa(undef)); in opt_undef_vecN()
142 nir_alu_instr *alu = nir_instr_as_alu(instr); in nir_opt_undef() local
144 progress = opt_undef_csel(alu) || progress; in nir_opt_undef()
145 progress = opt_undef_vecN(&b, alu) || progress; in nir_opt_undef()