Lines Matching defs:abs

65  *     and neg/abs input modifiers.
89 /* label_{abs,neg,mul,omod2,omod4,omod5,clamp} are used for both 16 and
1319 /* VALU: propagate neg, abs & inline constants */
1359 if (instr->isDPP16() && !instr->dpp16().abs[i])
1361 else if (instr->isSDWA() && !instr->sdwa().abs[i])
1363 else if (instr->isVOP3() && !instr->vop3().abs[i])
1372 instr->dpp16().abs[i] = true;
1374 instr->sdwa().abs[i] = true;
1376 instr->vop3().abs[i] = true;
1768 /* TODO: try to move the negate/abs modifier to the consumer instead */
1780 if (vop3 && (vop3->abs[!i] || vop3->neg[!i] || vop3->clamp || vop3->omod))
1783 bool abs = vop3 && vop3->abs[i];
1787 if (abs && neg && other.type() == RegType::vgpr)
1789 else if (abs && !neg && other.type() == RegType::vgpr)
1791 else if (!abs && neg && other.type() == RegType::vgpr)
1793 else if (!abs && !neg)
1827 if (vop3.abs[0] || vop3.abs[1] || vop3.abs[2] || vop3.neg[0] || vop3.neg[1] || vop3.neg[2] ||
2051 * neg/abs instructions because we'll likely combine it into another valu. */
2108 bool abs[2] = {false, false};
2131 if (vop3.neg[0] != vop3.neg[1] || vop3.abs[0] != vop3.abs[1] || vop3.opsel == 1 ||
2135 abs[i] = vop3.abs[0];
2168 if (neg[0] || neg[1] || abs[0] || abs[1] || opsel || num_sgprs > 1) {
2173 vop3->abs[i] = abs[i];
2245 memcpy(new_vop3->abs, cmp_vop3.abs, sizeof(new_vop3->abs));
2335 if (vop3.neg[0] != vop3.neg[1] || vop3.abs[0] != vop3.abs[1] || vop3.opsel == 1 ||
2370 memcpy(new_vop3->abs, cmp_vop3.abs, sizeof(new_vop3->abs));
2421 memcpy(new_vop3->abs, cmp_vop3.abs, sizeof(new_vop3->abs));
2431 memcpy(new_sdwa->abs, cmp_sdwa.abs, sizeof(new_sdwa->abs));
2442 memcpy(new_dpp->abs, cmp_dpp.abs, sizeof(new_dpp->abs));
2474 const char* shuffle_str, Operand operands[3], bool neg[3], bool abs[3],
2510 *inbetween_abs = op1_vop3 ? op1_vop3->abs[swap] : false;
2511 else if (op1_vop3 && op1_vop3->abs[swap])
2528 abs[shuffle[0]] = op1_vop3 ? op1_vop3->abs[!swap] : false;
2535 abs[shuffle[i + 1]] = op2_vop3 ? op2_vop3->abs[i] : false;
2549 Operand operands[3], bool neg[3], bool abs[3], uint8_t opsel, bool clamp,
2553 memcpy(new_instr->abs, abs, sizeof(bool[3]));
2576 bool neg[3], abs[3], clamp, precise;
2579 abs, &opsel, &clamp, &omod, NULL, NULL, NULL, &precise)) {
2581 create_vop3_for_op3(ctx, new_op, instr, operands, neg, abs, opsel, clamp, omod);
2644 bool neg[3] = {}, abs[3] = {};
2651 create_vop3_for_op3(ctx, op, instr, operands, neg, abs, opsel, clamp, omod);
2669 bool neg[3], abs[3], clamp, precise;
2673 abs, &opsel, &clamp, &omod, &inbetween_neg, NULL, NULL, &precise) &&
2678 create_vop3_for_op3(ctx, minmax3, instr, operands, neg, abs, opsel, clamp, omod);
2944 bool neg[3], abs[3], clamp, precise;
2947 abs, &opsel, &clamp, &omod, NULL, NULL, NULL, &precise)) {
2991 if (abs[const0_idx])
2993 if (abs[const1_idx])
3039 create_vop3_for_op3(ctx, med, instr, operands, neg, abs, opsel, clamp, omod);
3640 vop3p->neg_hi[is_add + i] = instr->isVOP3() && instr->vop3().abs[i];
3641 vop3p->neg_hi[is_add + i] |= instr->isSDWA() && instr->sdwa().abs[i];
3746 bool abs = (conv->isVOP3() && conv->vop3().abs[0]) || (conv->isSDWA() && conv->sdwa().abs[0]);
3749 instr->vop3p().neg_hi[i] = abs;
3846 * - abs(a - b) -> s_absdiff_i32
3855 /* neg(mul(a, b)) -> mul(neg(a), b), abs(mul(a, b)) -> mul(abs(a), abs(b)) */
3877 /* convert to mul(neg(a), b), mul(abs(a), abs(b)) or mul(neg(abs(a)), abs(b)) */
3892 new_mul.abs[0] = mul.abs[0];
3893 new_mul.abs[1] = mul.abs[1];
3898 new_mul.abs[0] = new_mul.abs[1] = true;
4005 bool abs[3] = {false, false, false};
4015 abs[0] = vop3.abs[0];
4016 abs[1] = vop3.abs[1];
4021 abs[0] = vop3p.neg_hi[0];
4022 abs[1] = vop3p.neg_hi[1];
4030 abs[2] = vop3.abs[add_op_idx];
4033 /* abs of the multiplication result */
4034 if (vop3.abs[1 - add_op_idx]) {
4037 abs[0] = true;
4038 abs[1] = true;
4045 abs[2] = vop3p.neg_hi[add_op_idx];
4049 /* abs of the multiplication result */
4053 abs[0] = true;
4054 abs[1] = true;
4077 mad->neg_hi[i] = abs[i];
4103 mad->abs[i] = abs[i];
4519 std::swap(dpp->abs[0], dpp->abs[1]);
4523 dpp->neg[0] ^= info.instr->dpp16().neg[0] && !dpp->abs[0];
4524 dpp->abs[0] |= info.instr->dpp16().abs[0];