diff --git a/src/amd/compiler/aco_ir.cpp b/src/amd/compiler/aco_ir.cpp index e746c666f78..f592cb6e65d 100644 --- a/src/amd/compiler/aco_ir.cpp +++ b/src/amd/compiler/aco_ir.cpp @@ -471,7 +471,8 @@ can_use_opsel(amd_gfx_level gfx_level, aco_opcode op, int idx) case aco_opcode::v_interp_p10_rtz_f16_f32_inreg: return idx == 0 || idx == 2; case aco_opcode::v_interp_p2_f16_f32_inreg: case aco_opcode::v_interp_p2_rtz_f16_f32_inreg: return idx == -1 || idx == 0; - default: return false; + default: + return gfx_level >= GFX11 && (get_gfx11_true16_mask(op) & BITFIELD_BIT(idx == -1 ? 3 : idx)); } } @@ -537,7 +538,6 @@ instr_is_16bit(amd_gfx_level gfx_level, aco_opcode op) /* On GFX11, for some instructions, bit 7 of the destination/operand vgpr is opsel and the field * only supports v0-v127. */ -// TODO: take advantage of this functionality in the RA and assembler uint8_t get_gfx11_true16_mask(aco_opcode op) {