aco: fix boolean undef regclass
authorRhys Perry <pendingchaos02@gmail.com>
Mon, 23 Mar 2020 13:49:08 +0000 (13:49 +0000)
committerMarge Bot <eric+marge@anholt.net>
Mon, 23 Mar 2020 19:43:09 +0000 (19:43 +0000)
Cc: <mesa-stable@lists.freedesktop.org>
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4285>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4285>

src/amd/compiler/aco_instruction_selection_setup.cpp

index feb914e1c53153a62c4bd02ebcefe5a2dd442dc1..2bf9ff0e09ad262d8a93f7d96d257bc2103d3d82 100644 (file)
@@ -593,6 +593,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;
             }