pan/bi: Fix incorrect abs flip in fma/fadd16
authorAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Mon, 6 Apr 2020 18:13:13 +0000 (14:13 -0400)
committerMarge Bot <eric+marge@anholt.net>
Mon, 6 Apr 2020 19:41:56 +0000 (19:41 +0000)
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4470>

src/panfrost/bifrost/bi_pack.c

index 99a0077d1aebfd5b43cedd445d1697e9eca9b700..89eab4fa04f0477b6ab56ff0f243d8ba5d7f46be 100644 (file)
@@ -591,8 +591,8 @@ bi_pack_fma_addmin_f16(bi_instruction *ins, struct bi_registers *regs)
         bool flip = false;
 
         if (!abs_0 && !abs_1) {
-                /* Force k = 0 <===> NOT(src1 < src0) <==> src1 >= src0 */
-                flip = (src_0 < src_1);
+                /* Force k = 0 <===> NOT(src1 < src0) */
+                flip = (src_1 < src_0);
         } else if (abs_0 && !abs_1) {
                 l = src_1 >= src_0;
         } else if (abs_1 && !abs_0) {