aco: don't allow SGPRs on logical phis
authorDaniel Schürmann <daniel@schuermann.dev>
Tue, 16 Jun 2020 09:03:52 +0000 (10:03 +0100)
committerDaniel Schürmann <daniel@schuermann.dev>
Tue, 16 Jun 2020 13:46:19 +0000 (14:46 +0100)
aco_validate() is called after phi lowering, now.

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5496>

src/amd/compiler/aco_validate.cpp

index 53c16bc5ac7b22407fe2ba968ee689f6eb60f736..26e1c9b35bcc8c662c27f856bf0a750f7be6e838 100644 (file)
@@ -317,7 +317,7 @@ void validate(Program* program, FILE * output)
                }
             } else if (instr->opcode == aco_opcode::p_phi) {
                check(instr->operands.size() == block.logical_preds.size(), "Number of Operands does not match number of predecessors", instr.get());
-               check(instr->definitions[0].getTemp().type() == RegType::vgpr || instr->definitions[0].getTemp().regClass() == program->lane_mask, "Logical Phi Definition must be vgpr or divergent boolean", instr.get());
+               check(instr->definitions[0].getTemp().type() == RegType::vgpr, "Logical Phi Definition must be vgpr", instr.get());
             } else if (instr->opcode == aco_opcode::p_linear_phi) {
                for (const Operand& op : instr->operands)
                   check(!op.isTemp() || op.getTemp().is_linear(), "Wrong Operand type", instr.get());