summaryrefslogtreecommitdiff
path: root/src/amd/compiler/aco_print_ir.cpp
diff options
context:
space:
mode:
authorGeorg Lehmann <dadschoorse@gmail.com>2023-03-07 14:38:34 +0100
committerMarge Bot <emma+marge@anholt.net>2023-03-09 14:15:13 +0000
commit828aff2a2de31dc934b36453840a9118d85bb2ee (patch)
treec3df92ba69ba8f619c6103ba2253a3907705c2a2 /src/amd/compiler/aco_print_ir.cpp
parenta47c3f84fb28a65bc74a922ef7f6eea28f1845d3 (diff)
downloadmesa-828aff2a2de31dc934b36453840a9118d85bb2ee.tar.gz
aco: use array indexing for opsel/opsel_lo/opsel_hi
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21766>
Diffstat (limited to 'src/amd/compiler/aco_print_ir.cpp')
-rw-r--r--src/amd/compiler/aco_print_ir.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/amd/compiler/aco_print_ir.cpp b/src/amd/compiler/aco_print_ir.cpp
index 623538bbfb8..6d2dab9b29b 100644
--- a/src/amd/compiler/aco_print_ir.cpp
+++ b/src/amd/compiler/aco_print_ir.cpp
@@ -746,15 +746,15 @@ aco_print_instr(enum amd_gfx_level gfx_level, const Instruction* instr, FILE* ou
for (unsigned i = 0; i < MIN2(num_operands, 3); ++i) {
abs[i] = valu.abs[i];
neg[i] = valu.neg[i];
- opsel[i] = valu.opsel & (1 << i);
+ opsel[i] = valu.opsel[i];
}
} else if (instr->isVOP3P() && is_mad_mix) {
const VALU_instruction& vop3p = instr->valu();
for (unsigned i = 0; i < MIN2(num_operands, 3); ++i) {
abs[i] = vop3p.neg_hi[i];
neg[i] = vop3p.neg_lo[i];
- f2f32[i] = vop3p.opsel_hi & (1 << i);
- opsel[i] = f2f32[i] && (vop3p.opsel_lo & (1 << i));
+ f2f32[i] = vop3p.opsel_hi[i];
+ opsel[i] = f2f32[i] && vop3p.opsel_lo[i];
}
}
for (unsigned i = 0; i < num_operands; ++i) {
@@ -779,9 +779,8 @@ aco_print_instr(enum amd_gfx_level gfx_level, const Instruction* instr, FILE* ou
if (instr->isVOP3P() && !is_mad_mix) {
const VALU_instruction& vop3 = instr->valu();
- if ((vop3.opsel_lo & (1 << i)) || !(vop3.opsel_hi & (1 << i))) {
- fprintf(output, ".%c%c", vop3.opsel_lo & (1 << i) ? 'y' : 'x',
- vop3.opsel_hi & (1 << i) ? 'y' : 'x');
+ if (vop3.opsel_lo[i] || !vop3.opsel_hi[i]) {
+ fprintf(output, ".%c%c", vop3.opsel_lo[i] ? 'y' : 'x', vop3.opsel_hi[i] ? 'y' : 'x');
}
if (vop3.neg_lo[i] && vop3.neg_hi[i])
fprintf(output, "*[-1,-1]");