From 2f97883276ba2d32e07216595612523de465cf50 Mon Sep 17 00:00:00 2001 From: Alyssa Rosenzweig Date: Thu, 12 Jan 2023 16:55:28 -0500 Subject: [PATCH] pan/bi: Add a unit test for fsat(reg.yx) This would have caught the issue from the previous commit. Split out to make backporting the previous change less onerous. Signed-off-by: Alyssa Rosenzweig Part-of: --- src/panfrost/compiler/test/test-lower-swizzle.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/panfrost/compiler/test/test-lower-swizzle.cpp b/src/panfrost/compiler/test/test-lower-swizzle.cpp index a6a35554974..3304b39a497 100644 --- a/src/panfrost/compiler/test/test-lower-swizzle.cpp +++ b/src/panfrost/compiler/test/test-lower-swizzle.cpp @@ -107,3 +107,9 @@ TEST_F(LowerSwizzle, ShiftWithNot) CASE(bi_lshift_and_v4i8_to(b, reg, y, bi_neg(x3210), z), bi_lshift_and_v4i8_to(b, reg, y, bi_neg(bi_swz_v4i8(b, x3210)), z)); } + +TEST_F(LowerSwizzle, FClampSwap) +{ + CASE(bi_fclamp_v2f16_to(b, reg, bi_swz_16(x, 1, 0)), + bi_swz_v2i16_to(b, reg, bi_swz_16(bi_fclamp_v2f16(b, x), 1, 0))); +}