aco: update SMEM offset workaround for LLVM 15
This isn't needed since LLVM 15's b0ccf38b018. Signed-off-by: Rhys Perry <pendingchaos02@gmail.com> Reviewed-By: Tatsuyuki Ishi <ishitatsuyuki@gmail.com> Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6663 Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17036>
This commit is contained in:
parent
d301883aba
commit
33e7ba2e3e
|
@ -308,22 +308,31 @@ disasm_instr(amd_gfx_level gfx_level, LLVMDisasmContextRef disasm, uint32_t* bin
|
|||
size = l / 4;
|
||||
}
|
||||
|
||||
#if LLVM_VERSION_MAJOR <= 14
|
||||
/* See: https://github.com/GPUOpen-Tools/radeon_gpu_profiler/issues/65 and
|
||||
* https://github.com/llvm/llvm-project/issues/38652
|
||||
*/
|
||||
if (gfx_level == GFX9 && (binary[pos] & 0xfc024000) == 0xc0024000) {
|
||||
if (invalid) {
|
||||
/* do nothing */
|
||||
} else if (gfx_level == GFX9 && (binary[pos] & 0xfc024000) == 0xc0024000) {
|
||||
/* SMEM with IMM=1 and SOE=1: LLVM ignores SOFFSET */
|
||||
size_t len = strlen(outline);
|
||||
snprintf(outline + len, outline_size - len, ", s%u", binary[pos + 1] >> 25);
|
||||
|
||||
char imm[16] = {0};
|
||||
while (outline[--len] != ' ') ;
|
||||
strncpy(imm, outline + len + 1, sizeof(imm) - 1);
|
||||
|
||||
snprintf(outline + len, outline_size - len, " s%u offset:%s", binary[pos + 1] >> 25, imm);
|
||||
} else if (gfx_level >= GFX10 && (binary[pos] & 0xfc000000) == 0xf4000000 &&
|
||||
(binary[pos + 1] & 0xfe000000) != 0xfa000000) {
|
||||
/* SMEM non-NULL SOFFSET: LLVM ignores OFFSET */
|
||||
uint32_t offset = binary[pos + 1] & 0x1fffff;
|
||||
if (offset) {
|
||||
size_t len = strlen(outline);
|
||||
snprintf(outline + len, outline_size - len, ", 0x%x", offset);
|
||||
snprintf(outline + len, outline_size - len, " offset:0x%x", offset);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
return std::make_pair(invalid, size);
|
||||
}
|
||||
|
|
|
@ -279,8 +279,8 @@ BEGIN_TEST(assembler.smem_offset)
|
|||
//~gfx10! s_load_dword s7, s[6:7], 0x42 ; f40001c3 fa000042
|
||||
bld.smem(aco_opcode::s_load_dword, dst, sbase, Operand::c32(0x42));
|
||||
if (i >= GFX9) {
|
||||
//~gfx9! s_load_dword s7, s[6:7], 0x42, s5 ; c00241c3 0a000042
|
||||
//~gfx10! s_load_dword s7, s[6:7], s5, 0x42 ; f40001c3 0a000042
|
||||
//~gfx9! s_load_dword s7, s[6:7], s5 offset:0x42 ; c00241c3 0a000042
|
||||
//~gfx10! s_load_dword s7, s[6:7], s5 offset:0x42 ; f40001c3 0a000042
|
||||
bld.smem(aco_opcode::s_load_dword, dst, sbase, Operand::c32(0x42), offset);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue