From b0194d041607abc6e71eb4d083e8c9b698445c56 Mon Sep 17 00:00:00 2001 From: Georg Lehmann Date: Thu, 9 Apr 2026 18:25:31 +0200 Subject: [PATCH] aco/tests: fix med3 NaN tests Reviewed-by: Rhys Perry Part-of: --- src/amd/compiler/tests/test_optimizer.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/amd/compiler/tests/test_optimizer.cpp b/src/amd/compiler/tests/test_optimizer.cpp index 29944c36f02..159fea6a948 100644 --- a/src/amd/compiler/tests/test_optimizer.cpp +++ b/src/amd/compiler/tests/test_optimizer.cpp @@ -474,19 +474,19 @@ BEGIN_TEST(optimize.clamp) /* correct NaN behaviour with precise */ if (cfg.min == aco_opcode::v_min_f16 || cfg.min == aco_opcode::v_min_f32) { - //~f(16|32)! v1: %res7 = @med3 @ub, @lb, %a - //~f(16|32)! p_unit_test 7, %res7 + //~.*f(16|32)! v1: (NaNPreserve)%res7 = @med3 @ub, @lb, %a + //~.*f(16|32)! p_unit_test 7, %res7 Builder::Result max = bld.vop2(cfg.max, bld.def(v1), cfg.lb, inputs[0]); - max.def(0).setPrecise(true); + max.def(0).setNaNPreserve(true); Builder::Result min = bld.vop2(cfg.min, bld.def(v1), cfg.ub, max); - max.def(0).setPrecise(true); + min.def(0).setNaNPreserve(true); writeout(7, min); - //~f(16|32)! v1: (precise)%res8_tmp = @min @ub, %a - //~f(16|32)! v1: %res8 = @max @lb, %res8_tmp - //~f(16|32)! p_unit_test 8, %res8 + //~.*f(16|32)! v1: (NaNPreserve)%res8_tmp = @min @ub, %a + //~.*f(16|32)! v1: %res8 = @max @lb, %res8_tmp + //~.*f(16|32)! p_unit_test 8, %res8 min = bld.vop2(cfg.min, bld.def(v1), cfg.ub, inputs[0]); - min.def(0).setPrecise(true); + min.def(0).setNaNPreserve(true); writeout(8, bld.vop2(cfg.max, bld.def(v1), cfg.lb, min)); }