Lines Matching defs:cmp

2192 /* s_or_b64(v_cmp_u_f32(a, b), cmp(a, b)) -> get_unordered(cmp)(a, b)
2193 * s_and_b64(v_cmp_o_f32(a, b), cmp(a, b)) -> get_ordered(cmp)(a, b) */
2206 Instruction* cmp = follow_operand(ctx, instr->operands[1], true);
2207 if (!nan_test || !cmp)
2209 if (nan_test->isSDWA() || cmp->isSDWA())
2212 if (get_f32_cmp(cmp->opcode) == expected_nan_test)
2213 std::swap(nan_test, cmp);
2217 if (!is_cmp(cmp->opcode) || get_cmp_bitsize(cmp->opcode) != get_cmp_bitsize(nan_test->opcode))
2222 if (!cmp->operands[0].isTemp() || !cmp->operands[1].isTemp())
2225 unsigned prop_cmp0 = original_temp_id(ctx, cmp->operands[0].getTemp());
2226 unsigned prop_cmp1 = original_temp_id(ctx, cmp->operands[1].getTemp());
2234 ctx.uses[cmp->operands[0].tempId()]++;
2235 ctx.uses[cmp->operands[1].tempId()]++;
2237 decrease_uses(ctx, cmp);
2239 aco_opcode new_op = is_or ? get_unordered(cmp->opcode) : get_ordered(cmp->opcode);
2241 if (cmp->isVOP3()) {
2244 VOP3_instruction& cmp_vop3 = cmp->vop3();
2254 new_instr->operands[0] = cmp->operands[0];
2255 new_instr->operands[1] = cmp->operands[1];
2293 /* s_or_b64(v_cmp_neq_f32(a, a), cmp(a, #b)) and b is not NaN -> get_unordered(cmp)(a, b)
2294 * s_and_b64(v_cmp_eq_f32(a, a), cmp(a, #b)) and b is not NaN -> get_ordered(cmp)(a, b) */
2306 Instruction* cmp = follow_operand(ctx, instr->operands[1], true);
2308 if (!nan_test || !cmp || nan_test->isSDWA() || cmp->isSDWA())
2310 if (nan_test->isSDWA() || cmp->isSDWA())
2314 if (get_f32_cmp(cmp->opcode) == expected_nan_test)
2315 std::swap(nan_test, cmp);
2319 unsigned bit_size = get_cmp_bitsize(cmp->opcode);
2320 if (!is_cmp(cmp->opcode) || get_cmp_bitsize(nan_test->opcode) != bit_size)
2325 if (!cmp->operands[0].isTemp() && !cmp->operands[1].isTemp())
2342 if (cmp->operands[i].isTemp() &&
2343 original_temp_id(ctx, cmp->operands[i].getTemp()) == prop_nan0) {
2352 if (!is_operand_constant(ctx, cmp->operands[constant_operand], bit_size, &constant_value))
2357 if (cmp->operands[0].isTemp())
2358 ctx.uses[cmp->operands[0].tempId()]++;
2359 if (cmp->operands[1].isTemp())
2360 ctx.uses[cmp->operands[1].tempId()]++;
2362 decrease_uses(ctx, cmp);
2364 aco_opcode new_op = is_or ? get_unordered(cmp->opcode) : get_ordered(cmp->opcode);
2366 if (cmp->isVOP3()) {
2369 VOP3_instruction& cmp_vop3 = cmp->vop3();
2379 new_instr->operands[0] = cmp->operands[0];
2380 new_instr->operands[1] = cmp->operands[1];
2391 /* s_andn2(exec, cmp(a, b)) -> get_inverse(cmp)(a, b) */
2400 Instruction* cmp = follow_operand(ctx, instr->operands[1]);
2401 if (!cmp)
2404 aco_opcode new_opcode = get_inverse(cmp->opcode);
2408 if (cmp->operands[0].isTemp())
2409 ctx.uses[cmp->operands[0].tempId()]++;
2410 if (cmp->operands[1].isTemp())
2411 ctx.uses[cmp->operands[1].tempId()]++;
2412 decrease_uses(ctx, cmp);
2417 if (cmp->isVOP3()) {
2420 VOP3_instruction& cmp_vop3 = cmp->vop3();
2427 } else if (cmp->isSDWA()) {
2430 SDWA_instruction& cmp_sdwa = cmp->sdwa();
2438 } else if (cmp->isDPP16()) {
2441 DPP16_instruction& cmp_dpp = cmp->dpp16();
2449 } else if (cmp->isDPP8()) {
2452 DPP8_instruction& cmp_dpp = cmp->dpp8();
2458 new_instr->operands[0] = cmp->operands[0];
2459 new_instr->operands[1] = cmp->operands[1];