aco/validate: validate that p_create_vector operands are aligned unless they are subdword operands

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8260>
This commit is contained in:
Daniel Schürmann 2020-12-30 16:38:08 +00:00 committed by Marge Bot
parent c0cec3a29b
commit 8fb66187ec
1 changed files with 1 additions and 0 deletions

View File

@ -359,6 +359,7 @@ bool validate_ir(Program* program)
if (instr->opcode == aco_opcode::p_create_vector) {
unsigned size = 0;
for (const Operand& op : instr->operands) {
check(op.bytes() < 4 || size % 4 == 0, "Operand is not aligned", instr.get());
size += op.bytes();
}
check(size == instr->definitions[0].bytes(), "Definition size does not match operand sizes", instr.get());