From 8f1674582119eb4532979c0fea382d2a1a66cff0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Sch=C3=BCrmann?= Date: Mon, 30 Oct 2023 16:19:20 +0100 Subject: [PATCH] aco: fix should_form_clause() for memory instructions without operands In particular, this applies to s_memtime and s_memrealtime. Part-of: --- src/amd/compiler/aco_ir.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/amd/compiler/aco_ir.cpp b/src/amd/compiler/aco_ir.cpp index cd8d1efee80..fa377a0f9b2 100644 --- a/src/amd/compiler/aco_ir.cpp +++ b/src/amd/compiler/aco_ir.cpp @@ -1308,6 +1308,9 @@ should_form_clause(const Instruction* a, const Instruction* b) if (a->format != b->format) return false; + if (a->operands.empty() || b->operands.empty()) + return false; + /* Assume loads which don't use descriptors might load from similar addresses. */ if (a->isFlatLike()) return true;