• Home
  • Raw
  • Download

Lines Matching refs:instr

36 is_pos_power_of_two(UNUSED struct hash_table *ht, const nir_alu_instr *instr,  in is_pos_power_of_two()  argument
41 if (!nir_src_is_const(instr->src[src].src)) in is_pos_power_of_two()
45 nir_alu_type type = nir_op_infos[instr->op].input_types[src]; in is_pos_power_of_two()
48 int64_t val = nir_src_comp_as_int(instr->src[src].src, swizzle[i]); in is_pos_power_of_two()
54 uint64_t val = nir_src_comp_as_uint(instr->src[src].src, swizzle[i]); in is_pos_power_of_two()
68 is_neg_power_of_two(UNUSED struct hash_table *ht, const nir_alu_instr *instr, in is_neg_power_of_two() argument
73 if (!nir_src_is_const(instr->src[src].src)) in is_neg_power_of_two()
76 int64_t int_min = u_intN_min(instr->src[src].src.ssa->bit_size); in is_neg_power_of_two()
79 nir_alu_type type = nir_op_infos[instr->op].input_types[src]; in is_neg_power_of_two()
82 int64_t val = nir_src_comp_as_int(instr->src[src].src, swizzle[i]); in is_neg_power_of_two()
99 const nir_alu_instr *instr, \
104 if (!nir_src_is_const(instr->src[src].src)) \
108 uint64_t val = nir_src_comp_as_uint(instr->src[src].src, swizzle[i]); \
124 is_zero_to_one(UNUSED struct hash_table *ht, const nir_alu_instr *instr, in is_zero_to_one() argument
129 if (!nir_src_is_const(instr->src[src].src)) in is_zero_to_one()
133 switch (nir_op_infos[instr->op].input_types[src]) { in is_zero_to_one()
135 double val = nir_src_comp_as_float(instr->src[src].src, swizzle[i]); in is_zero_to_one()
155 is_gt_0_and_lt_1(UNUSED struct hash_table *ht, const nir_alu_instr *instr, in is_gt_0_and_lt_1() argument
160 if (!nir_src_is_const(instr->src[src].src)) in is_gt_0_and_lt_1()
164 switch (nir_op_infos[instr->op].input_types[src]) { in is_gt_0_and_lt_1()
166 double val = nir_src_comp_as_float(instr->src[src].src, swizzle[i]); in is_gt_0_and_lt_1()
180 is_not_const_zero(UNUSED struct hash_table *ht, const nir_alu_instr *instr, in is_not_const_zero() argument
184 if (nir_src_as_const_value(instr->src[src].src) == NULL) in is_not_const_zero()
188 nir_alu_type type = nir_op_infos[instr->op].input_types[src]; in is_not_const_zero()
191 if (nir_src_comp_as_float(instr->src[src].src, swizzle[i]) == 0.0) in is_not_const_zero()
197 if (nir_src_comp_as_uint(instr->src[src].src, swizzle[i]) == 0) in is_not_const_zero()
210 is_ult_0xfffc07fc(UNUSED struct hash_table *ht, const nir_alu_instr *instr, in is_ult_0xfffc07fc() argument
215 if (!nir_src_is_const(instr->src[src].src)) in is_ult_0xfffc07fc()
220 nir_src_comp_as_uint(instr->src[src].src, swizzle[i]); in is_ult_0xfffc07fc()
230 is_not_const(UNUSED struct hash_table *ht, const nir_alu_instr *instr, in is_not_const() argument
234 return !nir_src_is_const(instr->src[src].src); in is_not_const()
238 is_not_fmul(struct hash_table *ht, const nir_alu_instr *instr, unsigned src, in is_not_fmul() argument
242 nir_src_as_alu_instr(instr->src[src].src); in is_not_fmul()
254 is_fmul(struct hash_table *ht, const nir_alu_instr *instr, unsigned src, in is_fmul() argument
258 nir_src_as_alu_instr(instr->src[src].src); in is_fmul()
270 is_fsign(const nir_alu_instr *instr, unsigned src, in is_fsign() argument
274 nir_src_as_alu_instr(instr->src[src].src); in is_fsign()
286 is_not_const_and_not_fsign(struct hash_table *ht, const nir_alu_instr *instr, in is_not_const_and_not_fsign() argument
290 return is_not_const(ht, instr, src, num_components, swizzle) && in is_not_const_and_not_fsign()
291 !is_fsign(instr, src, num_components, swizzle); in is_not_const_and_not_fsign()
295 is_used_once(nir_alu_instr *instr) in is_used_once() argument
297 bool zero_if_use = list_is_empty(&instr->dest.dest.ssa.if_uses); in is_used_once()
298 bool zero_use = list_is_empty(&instr->dest.dest.ssa.uses); in is_used_once()
303 if (!zero_if_use && list_is_singular(&instr->dest.dest.ssa.uses)) in is_used_once()
306 if (!zero_use && list_is_singular(&instr->dest.dest.ssa.if_uses)) in is_used_once()
309 if (!list_is_singular(&instr->dest.dest.ssa.if_uses) && in is_used_once()
310 !list_is_singular(&instr->dest.dest.ssa.uses)) in is_used_once()
317 is_used_by_if(nir_alu_instr *instr) in is_used_by_if() argument
319 return !list_is_empty(&instr->dest.dest.ssa.if_uses); in is_used_by_if()
323 is_not_used_by_if(nir_alu_instr *instr) in is_not_used_by_if() argument
325 return list_is_empty(&instr->dest.dest.ssa.if_uses); in is_not_used_by_if()
329 is_used_by_non_fsat(nir_alu_instr *instr) in is_used_by_non_fsat() argument
331 nir_foreach_use(src, &instr->dest.dest.ssa) { in is_used_by_non_fsat()
339 assert(instr != user_alu); in is_used_by_non_fsat()
348 is_only_used_as_float(nir_alu_instr *instr) in is_only_used_as_float() argument
350 nir_foreach_use(src, &instr->dest.dest.ssa) { in is_only_used_as_float()
356 assert(instr != user_alu); in is_only_used_as_float()
367 only_lower_8_bits_used(nir_alu_instr *instr) in only_lower_8_bits_used() argument
369 return (nir_ssa_def_bits_used(&instr->dest.dest.ssa) & ~0xffull) == 0; in only_lower_8_bits_used()
373 only_lower_16_bits_used(nir_alu_instr *instr) in only_lower_16_bits_used() argument
375 return (nir_ssa_def_bits_used(&instr->dest.dest.ssa) & ~0xffffull) == 0; in only_lower_16_bits_used()
384 is_upper_half_zero(UNUSED struct hash_table *ht, const nir_alu_instr *instr, in is_upper_half_zero() argument
388 if (nir_src_as_const_value(instr->src[src].src) == NULL) in is_upper_half_zero()
392 unsigned half_bit_size = nir_src_bit_size(instr->src[src].src) / 2; in is_upper_half_zero()
394 if ((nir_src_comp_as_uint(instr->src[src].src, in is_upper_half_zero()
409 is_lower_half_zero(UNUSED struct hash_table *ht, const nir_alu_instr *instr, in is_lower_half_zero() argument
413 if (nir_src_as_const_value(instr->src[src].src) == NULL) in is_lower_half_zero()
418 (1 << (nir_src_bit_size(instr->src[src].src) / 2)) - 1; in is_lower_half_zero()
419 if ((nir_src_comp_as_int(instr->src[src].src, swizzle[i]) & low_bits) != 0) in is_lower_half_zero()
427 no_signed_wrap(nir_alu_instr *instr) in no_signed_wrap() argument
429 return instr->no_signed_wrap; in no_signed_wrap()
433 no_unsigned_wrap(nir_alu_instr *instr) in no_unsigned_wrap() argument
435 return instr->no_unsigned_wrap; in no_unsigned_wrap()
439 is_integral(struct hash_table *ht, const nir_alu_instr *instr, unsigned src, in is_integral() argument
442 const struct ssa_result_range r = nir_analyze_range(ht, instr, src); in is_integral()
451 is_finite(UNUSED struct hash_table *ht, const nir_alu_instr *instr, in is_finite() argument
455 const struct ssa_result_range v = nir_analyze_range(ht, instr, src); in is_finite()
463 is_ ## r (struct hash_table *ht, const nir_alu_instr *instr, \
467 const struct ssa_result_range v = nir_analyze_range(ht, instr, src); \
472 is_a_number_ ## r (struct hash_table *ht, const nir_alu_instr *instr, \
476 const struct ssa_result_range v = nir_analyze_range(ht, instr, src); \
487 is_not_negative(struct hash_table *ht, const nir_alu_instr *instr, unsigned src, in RELATION()
490 const struct ssa_result_range v = nir_analyze_range(ht, instr, src); in RELATION()
495 is_a_number_not_negative(struct hash_table *ht, const nir_alu_instr *instr, in is_a_number_not_negative() argument
499 const struct ssa_result_range v = nir_analyze_range(ht, instr, src); in is_a_number_not_negative()
506 is_not_positive(struct hash_table *ht, const nir_alu_instr *instr, unsigned src, in is_not_positive() argument
509 const struct ssa_result_range v = nir_analyze_range(ht, instr, src); in is_not_positive()
514 is_a_number_not_positive(struct hash_table *ht, const nir_alu_instr *instr, in is_a_number_not_positive() argument
518 const struct ssa_result_range v = nir_analyze_range(ht, instr, src); in is_a_number_not_positive()
524 is_not_zero(struct hash_table *ht, const nir_alu_instr *instr, unsigned src, in is_not_zero() argument
527 const struct ssa_result_range v = nir_analyze_range(ht, instr, src); in is_not_zero()
532 is_a_number_not_zero(struct hash_table *ht, const nir_alu_instr *instr, in is_a_number_not_zero() argument
536 const struct ssa_result_range v = nir_analyze_range(ht, instr, src); in is_a_number_not_zero()
542 is_a_number(struct hash_table *ht, const nir_alu_instr *instr, unsigned src, in is_a_number() argument
545 const struct ssa_result_range v = nir_analyze_range(ht, instr, src); in is_a_number()