From: Rhys Perry Date: Tue, 19 May 2020 12:26:21 +0000 (+0100) Subject: aco: use num_opcodes instead of last_opcode X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=34d481fd1f689805e0f41a8907bd00f96270fbfc;p=mesa.git aco: use num_opcodes instead of last_opcode No fossil-db changes. Signed-off-by: Rhys Perry Reviewed-by: Daniel Schürmann Part-of: --- diff --git a/src/amd/compiler/aco_optimizer.cpp b/src/amd/compiler/aco_optimizer.cpp index 332d7a1987b..a07ea8092fc 100644 --- a/src/amd/compiler/aco_optimizer.cpp +++ b/src/amd/compiler/aco_optimizer.cpp @@ -1323,19 +1323,19 @@ ALWAYS_INLINE bool get_cmp_info(aco_opcode op, aco_opcode *ordered, aco_opcode * aco_opcode get_ordered(aco_opcode op) { aco_opcode ordered, unordered, inverse; - return get_cmp_info(op, &ordered, &unordered, &inverse) ? ordered : aco_opcode::last_opcode; + return get_cmp_info(op, &ordered, &unordered, &inverse) ? ordered : aco_opcode::num_opcodes; } aco_opcode get_unordered(aco_opcode op) { aco_opcode ordered, unordered, inverse; - return get_cmp_info(op, &ordered, &unordered, &inverse) ? unordered : aco_opcode::last_opcode; + return get_cmp_info(op, &ordered, &unordered, &inverse) ? unordered : aco_opcode::num_opcodes; } aco_opcode get_inverse(aco_opcode op) { aco_opcode ordered, unordered, inverse; - return get_cmp_info(op, &ordered, &unordered, &inverse) ? inverse : aco_opcode::last_opcode; + return get_cmp_info(op, &ordered, &unordered, &inverse) ? inverse : aco_opcode::num_opcodes; } bool is_cmp(aco_opcode op) @@ -1650,7 +1650,7 @@ bool combine_inverse_comparison(opt_ctx &ctx, aco_ptr& instr) return false; aco_opcode new_opcode = get_inverse(cmp->opcode); - if (new_opcode == aco_opcode::last_opcode) + if (new_opcode == aco_opcode::num_opcodes) return false; if (cmp->operands[0].isTemp())