From 246e22ff4f1e73dbec29482ec49c78648d05edbe Mon Sep 17 00:00:00 2001 From: Georg Lehmann Date: Thu, 22 Aug 2024 15:27:49 +0200 Subject: [PATCH] aco/tests: do not use mul with constant to tests neg modifier The neg can be moved to the constant operand, which defeats the point of the test. Reviewed-by: Rhys Perry Part-of: --- src/amd/compiler/tests/test_optimizer.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/amd/compiler/tests/test_optimizer.cpp b/src/amd/compiler/tests/test_optimizer.cpp index f0bf9a17c4e..9b55d4a78cc 100644 --- a/src/amd/compiler/tests/test_optimizer.cpp +++ b/src/amd/compiler/tests/test_optimizer.cpp @@ -19,11 +19,11 @@ BEGIN_TEST(optimize.neg) writeout(0, bld.vop2(aco_opcode::v_mul_f32, bld.def(v1), inputs[0], neg_b)); //~gfx9! v1: %neg_a = v_mul_f32 -1.0, %a - //~gfx9! v1: %res1 = v_mul_f32 0x123456, %neg_a - //~gfx10! v1: %res1 = v_mul_f32 0x123456, -%a + //~gfx9! v1: %res1 = v_max_f32 0x123456, %neg_a + //~gfx10! v1: %res1 = v_max_f32 0x123456, -%a //! p_unit_test 1, %res1 Temp neg_a = fneg(inputs[0]); - writeout(1, bld.vop2(aco_opcode::v_mul_f32, bld.def(v1), Operand::c32(0x123456u), neg_a)); + writeout(1, bld.vop2(aco_opcode::v_max_f32, bld.def(v1), Operand::c32(0x123456u), neg_a)); //! v1: %res2 = v_mul_f32 %a, %b //! p_unit_test 2, %res2