From bb191e3af5adc2cf3dcc7699584a488fc0af7ba7 Mon Sep 17 00:00:00 2001 From: Kenneth Graunke Date: Sat, 30 Dec 2023 16:28:45 -0800 Subject: [PATCH] intel/brw: Call constant combining after copy propagation/algebraic This copy propagation can create MADs with immediates in src1, which need to be cleaned up by constant combining (which puts them back in VGRFs). Reviewed-by: Ian Romanick Part-of: --- src/intel/compiler/brw_fs_opt.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/intel/compiler/brw_fs_opt.cpp b/src/intel/compiler/brw_fs_opt.cpp index 5f1a4db09f0..f7a1f2a618a 100644 --- a/src/intel/compiler/brw_fs_opt.cpp +++ b/src/intel/compiler/brw_fs_opt.cpp @@ -146,8 +146,10 @@ brw_fs_optimize(fs_visitor &s) OPT(brw_fs_lower_derivatives); OPT(brw_fs_lower_regioning); if (progress) { - if (OPT(brw_fs_opt_copy_propagation)) + if (OPT(brw_fs_opt_copy_propagation)) { OPT(brw_fs_opt_algebraic); + OPT(brw_fs_opt_combine_constants); + } OPT(brw_fs_opt_dead_code_eliminate); OPT(brw_fs_lower_simd_width); }