Lines Matching refs:denom
46 nir_ssa_def *numer, *denom, *af, *bf, *a, *b, *q, *r, *rt; in convert_instr() local
64 denom = nir_ssa_for_alu_src(bld, alu, 1); in convert_instr()
68 bf = nir_i2f32(bld, denom); in convert_instr()
72 b = nir_iabs(bld, denom); in convert_instr()
75 bf = nir_u2f32(bld, denom); in convert_instr()
77 b = denom; in convert_instr()
114 r = nir_ixor(bld, numer, denom); in convert_instr()
120 q = nir_imul(bld, q, denom); in convert_instr()
125 nir_bcsel(bld, r, nir_iadd(bld, q, denom), q)); in convert_instr()
139 emit_udiv(nir_builder *bld, nir_ssa_def *numer, nir_ssa_def *denom, bool modulo) in emit_udiv() argument
141 nir_ssa_def *rcp = nir_frcp(bld, nir_u2f32(bld, denom)); in emit_udiv()
145 nir_imul(bld, rcp, nir_ineg(bld, denom)); in emit_udiv()
151 nir_ssa_def *num_s_remainder = nir_imul(bld, quotient, denom); in emit_udiv()
155 nir_ssa_def *remainder_ge_den = nir_uge(bld, remainder, denom); in emit_udiv()
161 nir_isub(bld, remainder, denom), remainder); in emit_udiv()
164 remainder_ge_den = nir_uge(bld, remainder, denom); in emit_udiv()
166 return nir_bcsel(bld, remainder_ge_den, nir_isub(bld, remainder, denom), in emit_udiv()
176 emit_idiv(nir_builder *bld, nir_ssa_def *numer, nir_ssa_def *denom, nir_op op) in emit_idiv() argument
179 nir_ssa_def *rh_sign = nir_ilt(bld, denom, nir_imm_int(bld, 0)); in emit_idiv()
184 nir_ssa_def *rhs = nir_iadd(bld, denom, rh_sign); in emit_idiv()
200 res = nir_bcsel(bld, cond, res, nir_iadd(bld, res, denom)); in emit_idiv()
224 nir_ssa_def *denom = nir_ssa_for_alu_src(bld, alu, 1); in convert_instr_precise() local
229 res = emit_udiv(bld, numer, denom, op == nir_op_umod); in convert_instr_precise()
231 res = emit_idiv(bld, numer, denom, op); in convert_instr_precise()