summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRob Clark <[email protected]>2019-09-27 11:36:43 -0700
committerRob Clark <[email protected]>2019-10-18 15:08:54 -0700
commit666b6236f72932b2d6c8d816574357a113b3205c (patch)
tree2be2b740410a0d7200837b5afcd3213fa426ed94 /src
parent5e08f070f0fc99246fa8aab027feeee33b774177 (diff)
freedreno/ir3: add rule to generate imad24
Signed-off-by: Rob Clark <[email protected]> Reviewed-by: Kristian H. Kristensen <[email protected]> Reviewed-by: Eduardo Lima Mitev <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/freedreno/ir3/ir3_nir_imul.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/freedreno/ir3/ir3_nir_imul.py b/src/freedreno/ir3/ir3_nir_imul.py
index f648cd11071..45dee61ca1d 100644
--- a/src/freedreno/ir3/ir3_nir_imul.py
+++ b/src/freedreno/ir3/ir3_nir_imul.py
@@ -27,6 +27,11 @@ import sys
imul_lowering = [
(('imul', 'a@32', 'b@32'), ('imadsh_mix16', 'b', 'a', ('imadsh_mix16', 'a', 'b', ('umul_low', 'a', 'b')))),
+ # We want to run the imad24 rule late so that it doesn't fight
+ # with constant folding the (imul24, a, b). Since this pass is
+ # run late, and this is kinda imul related, this seems like a
+ # good place for it:
+ (('iadd', ('imul24', 'a', 'b'), 'c'), ('imad24_ir3', 'a', 'b', 'c')),
]