From caea4bbfdcb17f1625b547333633209487a323ca Mon Sep 17 00:00:00 2001 From: =?utf8?q?Daniel=20Sch=C3=BCrmann?= Date: Tue, 5 Nov 2019 15:27:59 +0100 Subject: [PATCH] aco: fix SMEM offsets for SI/CI Reviewed-by: Rhys Perry --- src/amd/compiler/aco_optimizer.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/amd/compiler/aco_optimizer.cpp b/src/amd/compiler/aco_optimizer.cpp index 3622812a862..e92531030c8 100644 --- a/src/amd/compiler/aco_optimizer.cpp +++ b/src/amd/compiler/aco_optimizer.cpp @@ -709,7 +709,8 @@ void label_instruction(opt_ctx &ctx, Block& block, aco_ptr& instr) SMEM_instruction *smem = static_cast(instr.get()); Temp base; uint32_t offset; - if (i == 1 && info.is_constant_or_literal() && info.val <= 0xFFFFF) { + if (i == 1 && info.is_constant_or_literal() && + (ctx.program->chip_class < GFX8 || info.val <= 0xFFFFF)) { instr->operands[i] = Operand(info.val); continue; } else if (i == 1 && parse_base_offset(ctx, instr.get(), i, &base, &offset) && base.regClass() == s1 && offset <= 0xFFFFF && ctx.program->chip_class >= GFX9) { -- 2.30.2