Lines Matching refs:tempId
626 ssa_info& info = ctx.info[instr->definitions[i].tempId()];
651 ssa_info& info = ctx.info[instr->definitions[i].tempId()];
710 if (op.tempId() != sgpr[0] && op.tempId() != sgpr[1]) {
712 sgpr[num_sgprs++] = op.tempId();
793 ctx.info[add_instr->operands[i].tempId()].is_constant_or_literal(32)) {
794 *offset = ctx.info[add_instr->operands[i].tempId()].val * (uint32_t)(is_sub ? -1 : 1);
824 if (!op.isTemp() || !ctx.info[op.tempId()].is_bitwise())
827 Instruction* bitwise_instr = ctx.info[op.tempId()].instr;
849 ssa_info info = ctx.info[instr->operands[1].tempId()];
864 if (ctx.info[smem.operands.back().tempId()].is_constant_or_literal(32) &&
865 ctx.info[smem.operands.back().tempId()].val == 0) {
1158 ctx.info[def.tempId()].label &= (label_vopc | label_f2f32 | instr_mod_labels);
1168 ssa_info& info = ctx.info[op.tempId()];
1239 if ((op.isTemp() && ctx.info[op.tempId()].is_canonicalized()) ||
1243 if (op.isConstant() || (op.isTemp() && ctx.info[op.tempId()].is_constant_or_literal(32))) {
1244 uint32_t val = op.isTemp() ? ctx.info[op.tempId()].val : op.constantValue();
1274 all_const && (!op.isTemp() || ctx.info[op.tempId()].is_constant_or_literal(32));
1291 ssa_info info = ctx.info[instr->operands[i].tempId()];
1297 instr->operands[i].setTemp(ctx.info[instr->operands[i].tempId()].temp);
1520 if (ctx.info[instr->operands[0].tempId()].is_scc_invert()) {
1524 instr->operands[0].setTemp(ctx.info[instr->operands[0].tempId()].temp);
1545 ctx.info[instr->definitions[0].tempId()].set_canonicalized();
1549 ctx.info[instr->definitions[0].tempId()].set_vopc(instr.get());
1554 ctx.info[instr->definitions[0].tempId()].set_vop3p(instr.get());
1564 ctx.info[instr->definitions[0].tempId()].set_temp(instr->operands[0].getTemp());
1575 if (aligned && op.isTemp() && ctx.info[op.tempId()].is_vec()) {
1576 Instruction* vec = ctx.info[op.tempId()].instr;
1591 if (ops[i].isTemp() && ctx.info[ops[i].tempId()].is_temp() &&
1592 ops[i].regClass() == ctx.info[ops[i].tempId()].temp.regClass())
1593 ops[i].setTemp(ctx.info[ops[i].tempId()].temp);
1602 ctx.info[instr->definitions[0].tempId()].set_vec(instr.get());
1606 if (instr->operands[1].isTemp() && ctx.info[instr->operands[1].tempId()].is_split()) {
1607 Instruction* split = ctx.info[instr->operands[1].tempId()].instr;
1610 ctx.info[instr->definitions[0].tempId()].set_temp(split->operands[0].getTemp());
1616 ssa_info& info = ctx.info[instr->operands[0].tempId()];
1622 ctx.info[def.tempId()].set_constant(ctx.program->gfx_level, val & mask);
1629 ctx.info[instr->definitions[1].tempId()].set_split(instr.get());
1632 ctx.info[instr->definitions[0].tempId()].set_temp(instr->operands[0].getTemp());
1633 ctx.info[instr->definitions[1].tempId()].set_extract(instr.get());
1639 Instruction* vec = ctx.info[instr->operands[0].tempId()].instr;
1654 ctx.info[instr->definitions[i].tempId()].set_constant(ctx.program->gfx_level,
1657 ctx.info[instr->definitions[i].tempId()].set_undefined();
1660 ctx.info[instr->definitions[i].tempId()].set_temp(vec_op.getTemp());
1666 ssa_info& info = ctx.info[instr->operands[0].tempId()];
1699 ctx.info[instr->definitions[0].tempId()].set_temp(instr->operands[0].getTemp());
1701 ctx.info[instr->definitions[0].tempId()].set_extract(instr.get());
1711 if (instr->operands[0].isTemp() && ctx.info[instr->operands[0].tempId()].is_vec() &&
1716 Instruction* vec = ctx.info[instr->operands[0].tempId()].instr;
1725 if (op.isTemp() && ctx.info[op.tempId()].is_temp() &&
1726 ctx.info[op.tempId()].temp.type() == instr->definitions[0].regClass().type())
1727 op.setTemp(ctx.info[op.tempId()].temp);
1729 ctx.info[instr->definitions[0].tempId()].set_vec(instr.get());
1739 ctx.info[instr->definitions[0].tempId()].set_constant(
1742 ctx.info[instr->definitions[0].tempId()].set_temp(instr->operands[0].getTemp());
1743 if (ctx.info[instr->operands[0].tempId()].is_canonicalized())
1744 ctx.info[instr->definitions[0].tempId()].set_canonicalized();
1753 ctx.info[instr->definitions[0].tempId()].set_dpp16(instr.get());
1755 ctx.info[instr->definitions[0].tempId()].set_dpp8(instr.get());
1760 ctx.info[instr->definitions[0].tempId()].set_constant(ctx.program->gfx_level, 0u);
1762 case aco_opcode::v_mul_f64: ctx.info[instr->definitions[0].tempId()].set_mul(instr.get()); break;
1766 ctx.info[instr->definitions[0].tempId()].set_mul(instr.get());
1788 ctx.info[instr->definitions[0].tempId()].set_neg_abs(other);
1790 ctx.info[instr->definitions[0].tempId()].set_abs(other);
1792 ctx.info[instr->definitions[0].tempId()].set_neg(other);
1794 ctx.info[instr->definitions[0].tempId()].set_fcanonicalize(other);
1799 ctx.info[instr->operands[i].tempId()].set_omod2(instr.get());
1802 ctx.info[instr->operands[i].tempId()].set_omod4(instr.get());
1805 ctx.info[instr->operands[i].tempId()].set_omod5(instr.get());
1810 ctx.info[instr->definitions[0].tempId()].set_constant(ctx.program->gfx_level, 0u);
1822 ctx.info[instr->definitions[0].tempId()].set_usedef(instr.get());
1843 ctx.info[instr->operands[idx].tempId()].set_clamp(instr.get());
1848 ctx.info[instr->definitions[0].tempId()].set_vcc(instr->operands[2].getTemp());
1851 ctx.info[instr->definitions[0].tempId()].set_b2f(instr->operands[2].getTemp());
1853 ctx.info[instr->definitions[0].tempId()].set_b2i(instr->operands[2].getTemp());
1859 ctx.info[instr->operands[1].tempId()].is_vcc())
1860 ctx.info[instr->definitions[0].tempId()].set_temp(
1861 ctx.info[instr->operands[1].tempId()].temp);
1871 instr->operands[i].tempId() != instr->operands[0].tempId())
1875 ctx.info[instr->definitions[0].tempId()].set_temp(instr->operands[0].getTemp());
1883 ctx.info[instr->definitions[0].tempId()].set_undefined();
1902 ctx.info[instr->definitions[0].tempId()].set_add_sub(instr.get());
1906 if (ctx.info[instr->operands[0].tempId()].is_uniform_bool()) {
1907 ctx.info[instr->definitions[0].tempId()].set_uniform_bitwise();
1908 ctx.info[instr->definitions[1].tempId()].set_scc_invert(
1909 ctx.info[instr->operands[0].tempId()].temp);
1910 } else if (ctx.info[instr->operands[0].tempId()].is_uniform_bitwise()) {
1911 ctx.info[instr->definitions[0].tempId()].set_uniform_bitwise();
1912 ctx.info[instr->definitions[1].tempId()].set_scc_invert(
1913 ctx.info[instr->operands[0].tempId()].instr->definitions[1].getTemp());
1915 ctx.info[instr->definitions[0].tempId()].set_bitwise(instr.get());
1920 if (ctx.info[instr->operands[0].tempId()].is_uniform_bool()) {
1923 ctx.info[instr->definitions[1].tempId()].set_temp(
1924 ctx.info[instr->operands[0].tempId()].temp);
1925 ctx.info[instr->definitions[0].tempId()].set_uniform_bool(
1926 ctx.info[instr->operands[0].tempId()].temp);
1928 } else if (ctx.info[instr->operands[0].tempId()].is_uniform_bitwise()) {
1931 ctx.info[instr->definitions[1].tempId()].set_temp(
1932 ctx.info[instr->operands[0].tempId()].instr->definitions[1].getTemp());
1933 ctx.info[instr->definitions[0].tempId()].set_uniform_bool(
1934 ctx.info[instr->operands[0].tempId()].instr->definitions[1].getTemp());
1941 ctx.info[instr->definitions[0].tempId()].set_temp(instr->operands[0].getTemp());
1944 ctx.info[instr->definitions[0].tempId()].set_temp(instr->operands[0].getTemp());
1956 return op.isTemp() && (ctx.info[op.tempId()].is_uniform_bool() ||
1957 ctx.info[op.tempId()].is_uniform_bitwise());
1959 ctx.info[instr->definitions[0].tempId()].set_uniform_bitwise();
1961 ctx.info[instr->definitions[0].tempId()].set_bitwise(instr.get());
1969 ctx.info[instr->definitions[0].tempId()].set_usedef(instr.get());
1987 ctx.info[instr->definitions[0].tempId()].set_minmax(instr.get());
1993 ctx.info[instr->definitions[0].tempId()].set_uniform_bool(instr->operands[2].getTemp());
1995 if (instr->operands[2].isTemp() && ctx.info[instr->operands[2].tempId()].is_scc_invert()) {
1998 instr->operands[2].setTemp(ctx.info[instr->operands[2].tempId()].temp);
2002 if (instr->operands[0].isTemp() && ctx.info[instr->operands[0].tempId()].is_scc_invert()) {
2003 ctx.info[instr->definitions[0].tempId()].set_temp(instr->operands[0].getTemp());
2010 ctx.info[instr->definitions[0].tempId()].set_canonicalized();
2014 ctx.info[instr->definitions[0].tempId()].set_extract(instr.get());
2016 ctx.info[instr->operands[0].tempId()].set_insert(instr.get());
2023 ctx.info[instr->operands[0].tempId()].set_insert(instr.get());
2025 ctx.info[instr->definitions[0].tempId()].set_extract(instr.get());
2026 ctx.info[instr->definitions[0].tempId()].set_bitwise(instr.get());
2034 ctx.info[instr->definitions[0].tempId()].set_usedef(instr.get());
2039 ctx.info[instr->operands[0].tempId()].set_f2f16(instr.get());
2044 ctx.info[instr->definitions[0].tempId()].set_f2f32(instr.get());
2052 if (!(ctx.info[instr->definitions[0].tempId()].label & (label_neg | label_abs)))
2068 if (!--ctx.uses[instr->definitions[0].tempId()]) {
2071 ctx.uses[op.tempId()]--;
2079 if (!op.isTemp() || !(ctx.info[op.tempId()].label & instr_usedef_labels))
2081 if (!ignore_uses && ctx.uses[op.tempId()] > 1)
2084 Instruction* instr = ctx.info[op.tempId()].instr;
2087 assert(instr->definitions[0].isTemp() && instr->definitions[0].tempId() == op.tempId());
2088 if (instr->definitions[1].isTemp() && ctx.uses[instr->definitions[1].tempId()])
2102 if (instr->definitions[1].isTemp() && ctx.uses[instr->definitions[1].tempId()])
2184 ctx.info[instr->definitions[0].tempId()].label = 0;
2185 ctx.info[instr->definitions[0].tempId()].set_vopc(new_instr);
2199 if (instr->definitions[1].isTemp() && ctx.uses[instr->definitions[1].tempId()])
2234 ctx.uses[cmp->operands[0].tempId()]++;
2235 ctx.uses[cmp->operands[1].tempId()]++;
2258 ctx.info[instr->definitions[0].tempId()].label = 0;
2259 ctx.info[instr->definitions[0].tempId()].set_vopc(new_instr);
2300 if (instr->definitions[1].isTemp() && ctx.uses[instr->definitions[1].tempId()])
2358 ctx.uses[cmp->operands[0].tempId()]++;
2360 ctx.uses[cmp->operands[1].tempId()]++;
2383 ctx.info[instr->definitions[0].tempId()].label = 0;
2384 ctx.info[instr->definitions[0].tempId()].set_vopc(new_instr);
2397 if (ctx.uses[instr->definitions[1].tempId()])
2409 ctx.uses[cmp->operands[0].tempId()]++;
2411 ctx.uses[cmp->operands[1].tempId()]++;
2462 ctx.info[instr->definitions[0].tempId()].label = 0;
2463 ctx.info[instr->definitions[0].tempId()].set_vopc(new_instr);
2562 ctx.info[instr->definitions[0].tempId()].label = 0;
2580 ctx.uses[instr->operands[swap].tempId()]--;
2650 ctx.uses[instr->operands[i].tempId()]--;
2675 ctx.uses[instr->operands[swap].tempId()]--;
2697 if (instr->definitions[1].isTemp() && ctx.uses[instr->definitions[1].tempId()])
2716 ctx.uses[instr->operands[0].tempId()]--;
2717 ctx.info[op2_instr->definitions[0].tempId()].label = 0;
2739 if (instr->definitions[0].isTemp() && ctx.info[instr->definitions[0].tempId()].is_uniform_bool())
2747 if (ctx.uses[op2_instr->definitions[1].tempId()] || fixed_to_exec(op2_instr->operands[0]))
2754 ctx.uses[instr->operands[i].tempId()]--;
2757 ctx.info[instr->definitions[0].tempId()].label = 0;
2776 if (instr->opcode == aco_opcode::s_add_i32 && ctx.uses[instr->definitions[1].tempId()])
2782 ctx.uses[op2_instr->definitions[1].tempId()])
2795 ctx.uses[instr->operands[i].tempId()]--;
2798 ctx.info[instr->definitions[0].tempId()].label = 0;
2818 if (instr->operands[i].isTemp() && ctx.info[instr->operands[i].tempId()].is_b2i() &&
2819 ctx.uses[instr->operands[i].tempId()] == 1) {
2832 ctx.uses[instr->operands[i].tempId()]--;
2846 new_instr->operands[2] = Operand(ctx.info[instr->operands[i].tempId()].temp);
2848 ctx.info[instr->definitions[0].tempId()].set_add_sub(instr.get());
2870 ctx.uses[instr->operands[i].tempId()]--;
2875 ctx.info[instr->definitions[0].tempId()].label = 0;
2963 ctx.info[operands[i].tempId()].is_constant_or_literal(32)) {
2964 val = ctx.info[operands[i].tempId()].val >> (hi16 ? 16 : 0);
3038 ctx.uses[instr->operands[swap].tempId()]--;
3065 if (instr->operands[i].tempId() != sgpr_ids[0])
3066 sgpr_ids[!!sgpr_ids[0]] = instr->operands[i].tempId();
3068 ssa_info& info = ctx.info[instr->operands[i].tempId()];
3090 uint16_t uses = ctx.uses[instr->operands[i].tempId()];
3093 sgpr_info_id = instr->operands[i].tempId();
3171 if (instr->definitions.empty() || ctx.uses[instr->definitions[0].tempId()] != 1 ||
3190 ssa_info& def_info = ctx.info[instr->definitions[0].tempId()];
3197 if (!ctx.uses[def_info.instr->definitions[0].tempId()])
3204 assert(!ctx.info[instr->definitions[0].tempId()].is_mad());
3219 ctx.info[instr->definitions[0].tempId()].label &= label_clamp | label_insert | label_f2f16;
3220 ctx.uses[def_info.instr->definitions[0].tempId()]--;
3231 if (instr->definitions.empty() || ctx.uses[instr->definitions[0].tempId()] != 1)
3234 ssa_info& def_info = ctx.info[instr->definitions[0].tempId()];
3239 if (!ctx.uses[def_info.instr->definitions[0].tempId()])
3243 assert(!ctx.info[instr->definitions[0].tempId()].is_mad());
3257 ctx.info[instr->definitions[0].tempId()].label = 0;
3258 ctx.uses[def_info.instr->definitions[0].tempId()]--;
3270 if (!ctx.info[extract->operands[0].tempId()].is_usedef() ||
3271 ctx.uses[extract->operands[0].tempId()] > 1)
3275 Instruction* ds = ctx.info[extract->operands[0].tempId()].instr;
3309 ctx.uses[extract->definitions[0].tempId()] = 0;
3310 ctx.info[ds->definitions[0].tempId()].label = 0;
3340 ctx.uses[instr->operands[i].tempId()]--;
3341 if (ctx.uses[instr->operands[i].tempId()])
3342 ctx.uses[op_instr->operands[2].tempId()]++;
3349 ctx.info[instr->definitions[0].tempId()].label = 0;
3406 ctx.uses[instr->operands[i].tempId()]--;
3415 ctx.info[instr->definitions[0].tempId()].label = 0;
3453 vop3p->clamp && instr->operands[0].isTemp() && ctx.uses[instr->operands[0].tempId()] == 1 &&
3456 ssa_info& info = ctx.info[instr->operands[0].tempId()];
3458 VOP3P_instruction* candidate = &ctx.info[instr->operands[0].tempId()].instr->vop3p();
3462 ctx.info[candidate->definitions[0].tempId()].instr = candidate;
3463 ctx.uses[instr->definitions[0].tempId()]--;
3475 ssa_info& info = ctx.info[op.tempId()];
3508 if (--ctx.uses[fneg->definitions[0].tempId()])
3509 ctx.uses[fneg->operands[0].tempId()]++;
3526 if (!instr->operands[i].isTemp() || !ctx.info[instr->operands[i].tempId()].is_vop3p())
3528 ssa_info& info = ctx.info[instr->operands[i].tempId()];
3539 if (ctx.uses[instr->operands[i].tempId()] >= uses || !check_vop3_operands(ctx, 3, op))
3550 uses = ctx.uses[instr->operands[i].tempId()];
3558 ctx.uses[mul_instr->definitions[0].tempId()]--;
3559 if (ctx.uses[mul_instr->definitions[0].tempId()]) {
3561 ctx.uses[op[0].tempId()]++;
3563 ctx.uses[op[1].tempId()]++;
3590 ctx.info[instr->definitions[0].tempId()].set_vop3p(instr.get());
3660 ctx.info[instr->definitions[0].tempId()].label &= label_f2f16 | label_clamp | label_mul;
3661 if (ctx.info[instr->definitions[0].tempId()].label & label_mul)
3662 ctx.info[instr->definitions[0].tempId()].instr = instr.get();
3668 ssa_info& def_info = ctx.info[instr->definitions[0].tempId()];
3673 if (!can_use_mad_mix(ctx, instr) || ctx.uses[instr->definitions[0].tempId()] != 1)
3676 if (!ctx.uses[conv->definitions[0].tempId()])
3689 ctx.info[instr->definitions[0].tempId()].label &= label_clamp;
3690 ctx.uses[conv->definitions[0].tempId()]--;
3738 ctx.uses[conv->operands[0].tempId()]++;
3761 if (op.isTemp() && ctx.info[op.tempId()].is_constant_or_literal(op.bytes() * 8))
3762 return is_pow_of_two(ctx, get_constant_op(ctx, ctx.info[op.tempId()], op.bytes() * 8));
3797 ssa_info& info = ctx.info[op.tempId()];
3802 if (ctx.uses[op.tempId()] > 4) {
3812 if (--ctx.uses[instr->operands[i].tempId()])
3813 ctx.uses[info.instr->operands[0].tempId()]++;
3834 ssa_info& info = ctx.info[instr->operands[0].tempId()];
3837 if (--ctx.uses[instr->operands[0].tempId()])
3838 ctx.uses[info.instr->operands[0].tempId()]++;
3856 if ((ctx.info[instr->definitions[0].tempId()].label & (label_neg | label_abs)) &&
3857 ctx.uses[instr->operands[1].tempId()] == 1) {
3858 Temp val = ctx.info[instr->definitions[0].tempId()].temp;
3878 ctx.uses[mul_instr->definitions[0].tempId()]--;
3880 bool is_neg = ctx.info[instr->definitions[0].tempId()].is_neg();
3881 bool is_abs = ctx.info[instr->definitions[0].tempId()].is_abs();
3903 ctx.info[instr->definitions[0].tempId()].set_mul(instr.get());
3927 if (!instr->operands[i].isTemp() || !ctx.info[instr->operands[i].tempId()].is_mul())
3929 ssa_info& info = ctx.info[instr->operands[i].tempId()];
3976 ctx.uses[instr->operands[i].tempId()] > uses)
3979 if (ctx.uses[instr->operands[i].tempId()] == uses) {
3980 unsigned cur_idx = mul_instr->definitions[0].tempId();
3981 unsigned new_idx = info.instr->definitions[0].tempId();
3988 uses = ctx.uses[instr->operands[i].tempId()];
3996 ctx.uses[mul_instr->definitions[0].tempId()]--;
3997 if (ctx.uses[mul_instr->definitions[0].tempId()]) {
3999 ctx.uses[op[0].tempId()]++;
4001 ctx.uses[op[1].tempId()]++;
4113 ctx.mad_infos.emplace_back(std::move(add_instr), mul_instr->definitions[0].tempId());
4114 ctx.info[instr->definitions[0].tempId()].set_mad(instr.get(), ctx.mad_infos.size() - 1);
4124 if (instr->operands[i].isTemp() && ctx.info[instr->operands[i].tempId()].is_b2f() &&
4125 ctx.uses[instr->operands[i].tempId()] == 1 && instr->operands[!i].isTemp() &&
4127 ctx.uses[instr->operands[i].tempId()]--;
4128 ctx.uses[ctx.info[instr->operands[i].tempId()].temp.id()]++;
4134 new_instr->operands[2] = Operand(ctx.info[instr->operands[i].tempId()].temp);
4137 ctx.info[instr->definitions[0].tempId()].label = 0;
4183 bool carry_out = ctx.uses[instr->definitions[1].tempId()] > 0;
4193 instr->opcode != aco_opcode::v_sub_u32 && ctx.uses[instr->definitions[1].tempId()] > 0;
4224 ctx.info[instr->definitions[0].tempId()].set_mad(instr.get(), ctx.mad_infos.size() - 1);
4250 if (!ctx.info[op.tempId()].is_uniform_bool() && !ctx.info[op.tempId()].is_uniform_bitwise())
4267 ctx.uses[op.tempId()]--;
4269 if (ctx.info[op.tempId()].is_uniform_bool()) {
4271 op.setTemp(ctx.info[op.tempId()].temp);
4272 } else if (ctx.info[op.tempId()].is_uniform_bitwise()) {
4278 Instruction* pred_instr = ctx.info[op.tempId()].instr;
4287 ctx.uses[op.tempId()]++;
4290 instr->definitions[0].setTemp(Temp(instr->definitions[0].tempId(), s1));
4313 if (ctx.uses[instr->definitions[i].tempId()]) {
4320 if (num_used == 1 && ctx.info[instr->operands[0].tempId()].is_vec() &&
4321 ctx.uses[instr->operands[0].tempId()] == 1) {
4322 Instruction* vec = ctx.info[instr->operands[0].tempId()].instr;
4334 ctx.uses[instr->operands[0].tempId()]--;
4337 ctx.uses[vec_op.tempId()]--;
4340 ctx.uses[op.tempId()]++;
4366 if (!instr->definitions.empty() && ctx.info[instr->definitions[0].tempId()].is_mad()) {
4367 mad_info = &ctx.mad_infos[ctx.info[instr->definitions[0].tempId()].instr->pass_flags];
4372 ctx.uses[instr->operands[0].tempId()]--;
4374 ctx.uses[instr->operands[1].tempId()]--;
4398 ctx.info[instr->operands[2].tempId()].is_literal(get_operand_size(instr, 2))) {
4412 literal_uses = ctx.uses[instr->operands[2].tempId()];
4428 if (ctx.info[instr->operands[i].tempId()].is_literal(get_operand_size(instr, i)) &&
4429 ctx.uses[instr->operands[i].tempId()] < literal_uses) {
4431 literal_uses = ctx.uses[instr->operands[i].tempId()];
4444 ctx.uses[instr->operands[literal_idx].tempId()]--;
4456 ctx.info[instr->operands[0].tempId()].set_scc_needed();
4461 ctx.info[instr->operands[2].tempId()].set_scc_needed();
4463 ctx.info[instr->definitions[0].tempId()].is_scc_needed()) {
4465 ctx.info[instr->operands[0].tempId()].set_scc_needed();
4476 if (instr->definitions.size() && ctx.uses[instr->definitions[0].tempId()] == 0 &&
4477 ctx.info[instr->definitions[0].tempId()].is_uniform_bitwise()) {
4480 if (transform_done && !ctx.info[instr->definitions[1].tempId()].is_scc_needed()) {
4497 ssa_info info = ctx.info[instr->operands[i].tempId()];
4526 if (--ctx.uses[info.instr->definitions[0].tempId()])
4527 ctx.uses[info.instr->operands[0].tempId()]++;
4562 op.tempId() != sgpr_ids[0])
4563 sgpr_ids[!!sgpr_ids[0]] = op.tempId();
4568 } else if (!op.isTemp() || !ctx.info[op.tempId()].is_literal(bits)) {
4575 if (ctx.uses[op.tempId()] < literal_uses) {
4578 literal = Operand::c32(ctx.info[op.tempId()].val);
4579 literal_uses = ctx.uses[op.tempId()];
4580 literal_id = op.tempId();
4583 mask |= (op.tempId() == literal_id) << i;
4605 if (instr->operands[i].isTemp() && instr->operands[i].tempId() == literal_id)
4606 ctx.uses[instr->operands[i].tempId()]--;
4726 if (!instr->definitions.empty() && ctx.info[instr->definitions[0].tempId()].is_mad()) {
4727 mad_info* info = &ctx.mad_infos[ctx.info[instr->definitions[0].tempId()].instr->pass_flags];
4729 (ctx.uses[instr->operands[info->literal_idx].tempId()] == 0 || info->literal_idx == 2)) {
4754 Operand::c32(ctx.info[instr->operands[info->literal_idx].tempId()].val);
4766 if (op.isTemp() && ctx.info[op.tempId()].is_literal(bits) && ctx.uses[op.tempId()] == 0) {
4767 Operand literal = Operand::literal32(ctx.info[op.tempId()].val);
4780 if (instr->opcode == aco_opcode::s_add_u32 && ctx.uses[instr->definitions[1].tempId()] == 0 &&