From 525cbe85ef522902d9e14ddc5a4b17f91f2ebea2 Mon Sep 17 00:00:00 2001 From: Afonso Bordado Date: Fri, 27 Dec 2019 17:09:51 +0000 Subject: 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 Reviewed-by: Alyssa Rosenzweig --- src/panfrost/midgard/compiler.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/panfrost/midgard/compiler.h') diff --git a/src/panfrost/midgard/compiler.h b/src/panfrost/midgard/compiler.h index 85b7a87405e..024aaf93f64 100644 --- a/src/panfrost/midgard/compiler.h +++ b/src/panfrost/midgard/compiler.h @@ -705,5 +705,6 @@ bool midgard_opt_fuse_dest_invert(compiler_context *ctx, midgard_block *block); bool midgard_opt_csel_invert(compiler_context *ctx, midgard_block *block); bool midgard_opt_promote_fmov(compiler_context *ctx, midgard_block *block); bool midgard_opt_drop_cmp_invert(compiler_context *ctx, midgard_block *block); +bool midgard_opt_invert_branch(compiler_context *ctx, midgard_block *block); #endif -- cgit v1.2.3