From ca17bf0f812e9bf09dabdada3df7f911c64e7590 Mon Sep 17 00:00:00 2001 From: Rhys Perry Date: Mon, 23 Mar 2020 13:49:08 +0000 Subject: [PATCH] aco: fix boolean undef regclass MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Signed-off-by: Rhys Perry Reviewed-by: Daniel Schürmann Tested-by: Marge Bot Part-of: (cherry picked from commit 17c7f4e30ed8f7a04ae3ad80e39cfbdf8d8ea46c) --- .pick_status.json | 2 +- src/amd/compiler/aco_instruction_selection_setup.cpp | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.pick_status.json b/.pick_status.json index f51f621e058..3779ecba1c5 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -364,7 +364,7 @@ "description": "aco: fix boolean undef regclass", "nominated": true, "nomination_type": 0, - "resolution": 0, + "resolution": 1, "master_sha": null, "because_sha": null }, diff --git a/src/amd/compiler/aco_instruction_selection_setup.cpp b/src/amd/compiler/aco_instruction_selection_setup.cpp index 78d06ae6f8e..347b32deb60 100644 --- a/src/amd/compiler/aco_instruction_selection_setup.cpp +++ b/src/amd/compiler/aco_instruction_selection_setup.cpp @@ -586,6 +586,8 @@ void init_context(isel_context *ctx, nir_shader *shader) unsigned size = nir_instr_as_ssa_undef(instr)->def.num_components; if (nir_instr_as_ssa_undef(instr)->def.bit_size == 64) size *= 2; + else if (nir_instr_as_ssa_undef(instr)->def.bit_size == 1) + size *= lane_mask_size; allocated[nir_instr_as_ssa_undef(instr)->def.index] = Temp(0, RegClass(RegType::sgpr, size)); break; }