From 1ae73bc0768cafa21897bced6d4d635059569fd1 Mon Sep 17 00:00:00 2001 From: Rhys Perry Date: Mon, 17 Oct 2022 20:24:23 +0100 Subject: [PATCH] nir/algebraic: optimize b< 85611 (-0.26%); split: -0.27%, +0.00% CodeSize: 481304 -> 480332 (-0.20%); split: -0.21%, +0.00% Latency: 9596559 -> 9596152 (-0.00%); split: -0.00%, +0.00% InvThroughput: 1423707 -> 1423670 (-0.00%) SClause: 3872 -> 3874 (+0.05%) PreSGPRs: 5034 -> 5038 (+0.08%) Signed-off-by: Rhys Perry Reviewed-by: Georg Lehmann Part-of: --- src/compiler/nir/nir_opt_algebraic.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/compiler/nir/nir_opt_algebraic.py b/src/compiler/nir/nir_opt_algebraic.py index 4000d25..834565d 100644 --- a/src/compiler/nir/nir_opt_algebraic.py +++ b/src/compiler/nir/nir_opt_algebraic.py @@ -161,6 +161,7 @@ optimizations = [ (('~fadd', ('fmulz(is_used_once)', a, b), ('ffmaz(is_used_once)', a, c, d)), ('ffmaz', a, ('fadd', b, c), d)), (('~ffmaz', a, ('fmulz(is_used_once)', b, c), ('fmulz(is_used_once)', b, d)), ('fmulz', b, ('ffmaz', a, c, d))), (('iadd', ('imul', a, b), ('imul', a, c)), ('imul', a, ('iadd', b, c))), + (('iadd', ('ishl', b, a), ('ishl', c, a)), ('ishl', ('iadd', b, c), a)), (('iand', ('ior', a, b), ('ior', a, c)), ('ior', a, ('iand', b, c))), (('ior', ('iand', a, b), ('iand', a, c)), ('iand', a, ('ior', b, c))), (('ieq', ('iand', a, '#b(is_pos_power_of_two)'), b), ('ine', ('iand', a, b), 0)), -- 2.7.4