Lines Matching refs:alu1
424 nir_alu_srcs_negative_equal(const nir_alu_instr *alu1, in nir_alu_srcs_negative_equal() argument
430 assert(nir_alu_instr_channel_used(alu1, src1, i) == in nir_alu_srcs_negative_equal()
434 if (nir_op_infos[alu1->op].input_types[src1] == nir_type_float) { in nir_alu_srcs_negative_equal()
435 assert(nir_op_infos[alu1->op].input_types[src1] == in nir_alu_srcs_negative_equal()
438 assert(nir_op_infos[alu1->op].input_types[src1] == nir_type_int); in nir_alu_srcs_negative_equal()
443 if (alu1->src[src1].abs != alu2->src[src2].abs) in nir_alu_srcs_negative_equal()
446 bool parity = alu1->src[src1].negate != alu2->src[src2].negate; in nir_alu_srcs_negative_equal()
451 nir_src_as_const_value(alu1->src[src1].src); in nir_alu_srcs_negative_equal()
466 if (nir_src_bit_size(alu1->src[src1].src) != in nir_alu_srcs_negative_equal()
470 const nir_alu_type full_type = nir_op_infos[alu1->op].input_types[src1] | in nir_alu_srcs_negative_equal()
471 nir_src_bit_size(alu1->src[src1].src); in nir_alu_srcs_negative_equal()
473 if (nir_alu_instr_channel_used(alu1, src1, i) && in nir_alu_srcs_negative_equal()
474 !nir_const_value_negative_equal(const1[alu1->src[src1].swizzle[i]], in nir_alu_srcs_negative_equal()
485 nir_alu_instr *neg1 = get_neg_instr(alu1->src[src1].src); in nir_alu_srcs_negative_equal()
494 alu1_actual_src = alu1->src[src1].src; in nir_alu_srcs_negative_equal()
496 for (unsigned i = 0; i < nir_ssa_alu_instr_src_components(alu1, src1); i++) in nir_alu_srcs_negative_equal()
517 for (unsigned i = 0; i < nir_ssa_alu_instr_src_components(alu1, src1); i++) { in nir_alu_srcs_negative_equal()
518 if (alu1_swizzle[alu1->src[src1].swizzle[i]] != in nir_alu_srcs_negative_equal()
527 nir_alu_srcs_equal(const nir_alu_instr *alu1, const nir_alu_instr *alu2, in nir_alu_srcs_equal() argument
530 if (alu1->src[src1].abs != alu2->src[src2].abs || in nir_alu_srcs_equal()
531 alu1->src[src1].negate != alu2->src[src2].negate) in nir_alu_srcs_equal()
534 for (unsigned i = 0; i < nir_ssa_alu_instr_src_components(alu1, src1); i++) { in nir_alu_srcs_equal()
535 if (alu1->src[src1].swizzle[i] != alu2->src[src2].swizzle[i]) in nir_alu_srcs_equal()
539 return nir_srcs_equal(alu1->src[src1].src, alu2->src[src2].src); in nir_alu_srcs_equal()
558 nir_alu_instr *alu1 = nir_instr_as_alu(instr1); in nir_instrs_equal() local
561 if (alu1->op != alu2->op) in nir_instrs_equal()
566 if (alu1->no_signed_wrap != alu2->no_signed_wrap) in nir_instrs_equal()
569 if (alu1->no_unsigned_wrap != alu2->no_unsigned_wrap) in nir_instrs_equal()
575 if (alu1->dest.dest.ssa.num_components != alu2->dest.dest.ssa.num_components) in nir_instrs_equal()
578 if (alu1->dest.dest.ssa.bit_size != alu2->dest.dest.ssa.bit_size) in nir_instrs_equal()
581 if (nir_op_infos[alu1->op].algebraic_properties & NIR_OP_IS_2SRC_COMMUTATIVE) { in nir_instrs_equal()
582 if ((!nir_alu_srcs_equal(alu1, alu2, 0, 0) || in nir_instrs_equal()
583 !nir_alu_srcs_equal(alu1, alu2, 1, 1)) && in nir_instrs_equal()
584 (!nir_alu_srcs_equal(alu1, alu2, 0, 1) || in nir_instrs_equal()
585 !nir_alu_srcs_equal(alu1, alu2, 1, 0))) in nir_instrs_equal()
588 for (unsigned i = 2; i < nir_op_infos[alu1->op].num_inputs; i++) { in nir_instrs_equal()
589 if (!nir_alu_srcs_equal(alu1, alu2, i, i)) in nir_instrs_equal()
593 for (unsigned i = 0; i < nir_op_infos[alu1->op].num_inputs; i++) { in nir_instrs_equal()
594 if (!nir_alu_srcs_equal(alu1, alu2, i, i)) in nir_instrs_equal()