Module: Mesa Branch: staging/23.0 Commit: ac5af2ddf297044b5bd076e901f2ca1dd17a6537 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=ac5af2ddf297044b5bd076e901f2ca1dd17a6537
Author: Lionel Landwerlin <[email protected]> Date: Fri Mar 24 13:56:06 2023 +0200 intel/fs: UNDEF fixup_nomask_control_flow temp register Ensure that the register's liveness is not expanded to loops. Signed-off-by: Lionel Landwerlin <[email protected]> Cc: mesa-stable Reviewed-by: Francisco Jerez <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21853> (cherry picked from commit adb8c30436222f73cba0abccddf44c89d00f52e1) --- .pick_status.json | 2 +- src/intel/compiler/brw_fs.cpp | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.pick_status.json b/.pick_status.json index 8dfbf1c11a4..9e2a2344b79 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -166,7 +166,7 @@ "description": "intel/fs: UNDEF fixup_nomask_control_flow temp register", "nominated": true, "nomination_type": 0, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": null }, diff --git a/src/intel/compiler/brw_fs.cpp b/src/intel/compiler/brw_fs.cpp index a8c7db4d3ec..8253643a67c 100644 --- a/src/intel/compiler/brw_fs.cpp +++ b/src/intel/compiler/brw_fs.cpp @@ -6571,10 +6571,12 @@ fs_visitor::fixup_nomask_control_flow() */ const bool save_flag = flag_liveout & flag_mask(flag, dispatch_width / 8); - const fs_reg tmp = ubld.group(1, 0).vgrf(flag.type); + const fs_reg tmp = ubld.group(8, 0).vgrf(flag.type); - if (save_flag) + if (save_flag) { + ubld.group(8, 0).UNDEF(tmp); ubld.group(1, 0).MOV(tmp, flag); + } ubld.emit(FS_OPCODE_LOAD_LIVE_CHANNELS);
