aco: add integer min/max to can_swap_operands
authorRhys Perry <pendingchaos02@gmail.com>
Fri, 13 Dec 2019 16:17:21 +0000 (16:17 +0000)
committerMarge Bot <eric+marge@anholt.net>
Tue, 14 Jan 2020 12:56:28 +0000 (12:56 +0000)
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/2883>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/2883>

src/amd/compiler/aco_optimizer.cpp

index 19e78f9e656962fffcc608b1018a61e73038b080..77cdf3b04a9fba0932eeee43c2d3a68d45840ae5 100644 (file)
@@ -393,6 +393,10 @@ bool can_swap_operands(aco_ptr<Instruction>& instr)
    case aco_opcode::v_xor_b32:
    case aco_opcode::v_max_f32:
    case aco_opcode::v_min_f32:
+   case aco_opcode::v_max_i32:
+   case aco_opcode::v_min_i32:
+   case aco_opcode::v_max_u32:
+   case aco_opcode::v_min_u32:
    case aco_opcode::v_cmp_eq_f32:
    case aco_opcode::v_cmp_lg_f32:
       return true;