pan/midgard: Optimize branches with inverted arguments
authorAfonso Bordado <afonsobordado@az8.co>
Fri, 27 Dec 2019 17:09:51 +0000 (17:09 +0000)
committerAfonso Bordado <afonsobordado@az8.co>
Tue, 31 Dec 2019 20:01:16 +0000 (20:01 +0000)
commit525cbe85ef522902d9e14ddc5a4b17f91f2ebea2
tree8b33dda792d75f4abbf1ea1cdc24c03350560bd3
parent0e83688f477a2e98f94f342cd9a637a9f140a69d
pan/midgard: Optimize branches with inverted arguments

Remove the invert on arguments to branches, and invert the branch
condition instead. This saves one instruction per inverted argument.

Closes #2088

Signed-off-by: Afonso Bordado <afonsobordado@az8.co>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
src/panfrost/midgard/compiler.h
src/panfrost/midgard/midgard_compile.c
src/panfrost/midgard/midgard_opt_invert.c