aco: fix labelling of s_not with constant

Fixes RADV compilation of a Cyberpunk 2077 RT pipeline with
PIPELINE_CREATE_DISABLE_OPTIMIZATION_BIT.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Fixes: dfaa3c0af6 ("aco: Flip s_cbranch / s_cselect to optimize out an s_not if possible.")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27194>
(cherry picked from commit 6dc182b6b2)
This commit is contained in:
Rhys Perry 2024-01-19 19:53:28 +00:00 committed by Eric Engestrom
parent 847aeea466
commit 768a21a893
2 changed files with 3 additions and 2 deletions

View file

@ -1994,7 +1994,7 @@
"description": "aco: fix labelling of s_not with constant",
"nominated": true,
"nomination_type": 1,
"resolution": 0,
"resolution": 1,
"main_sha": null,
"because_sha": "dfaa3c0af69ab035cb825943b1cee0f60272010e",
"notes": null

View file

@ -2003,7 +2003,8 @@ label_instruction(opt_ctx& ctx, aco_ptr<Instruction>& instr)
break;
case aco_opcode::s_not_b32:
case aco_opcode::s_not_b64:
if (ctx.info[instr->operands[0].tempId()].is_uniform_bool()) {
if (!instr->operands[0].isTemp()) {
} else if (ctx.info[instr->operands[0].tempId()].is_uniform_bool()) {
ctx.info[instr->definitions[0].tempId()].set_uniform_bitwise();
ctx.info[instr->definitions[1].tempId()].set_scc_invert(
ctx.info[instr->operands[0].tempId()].temp);