From a024de19ac5d1d1d2e9dbc8dc20a4e38265aeda6 Mon Sep 17 00:00:00 2001 From: Rhys Perry Date: Tue, 25 Aug 2020 21:19:11 +0100 Subject: [PATCH] aco: fix regclass checks when fixing to vcc/exec with Builder MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Rhys Perry Reviewed-by: Daniel Schürmann Cc: 20.2 Part-of: (cherry picked from commit fc9f502a5bd853128a9c2932c793180035883efc) --- .pick_status.json | 2 +- src/amd/compiler/aco_builder_h.py | 9 ++++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/.pick_status.json b/.pick_status.json index 3268f93f5ec..2fbab8ab0f3 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -733,7 +733,7 @@ "description": "aco: fix regclass checks when fixing to vcc/exec with Builder", "nominated": true, "nomination_type": 0, - "resolution": 0, + "resolution": 1, "master_sha": null, "because_sha": null }, diff --git a/src/amd/compiler/aco_builder_h.py b/src/amd/compiler/aco_builder_h.py index fb28181a9b4..8d541cbd72f 100644 --- a/src/amd/compiler/aco_builder_h.py +++ b/src/amd/compiler/aco_builder_h.py @@ -317,7 +317,8 @@ public: % for fixed in ['m0', 'vcc', 'exec', 'scc']: Operand ${fixed}(Temp tmp) { % if fixed == 'vcc' or fixed == 'exec': - assert(tmp.regClass() == lm); + //vcc_hi and exec_hi can still be used in wave32 + assert(tmp.type() == RegType::sgpr && tmp.bytes() <= 8); % endif Operand op(tmp); op.setFixed(aco::${fixed}); @@ -326,7 +327,8 @@ public: Definition ${fixed}(Definition def) { % if fixed == 'vcc' or fixed == 'exec': - assert(def.regClass() == lm); + //vcc_hi and exec_hi can still be used in wave32 + assert(def.regClass().type() == RegType::sgpr && def.bytes() <= 8); % endif def.setFixed(aco::${fixed}); return def; @@ -334,7 +336,8 @@ public: Definition hint_${fixed}(Definition def) { % if fixed == 'vcc' or fixed == 'exec': - assert(def.regClass() == lm); + //vcc_hi and exec_hi can still be used in wave32 + assert(def.regClass().type() == RegType::sgpr && def.bytes() <= 8); % endif def.setHint(aco::${fixed}); return def;