Mesa (main): pan/bi: Ensure the end NOP isn't eliminated
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Wed May 11 22:15:09 UTC 2022
Module: Mesa
Branch: main
Commit: 5cfae66cdea1cd1bd669d3b22247185e8a90a187
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=5cfae66cdea1cd1bd669d3b22247185e8a90a187
Author: Alyssa Rosenzweig <alyssa at collabora.com>
Date: Mon May 2 15:28:38 2022 -0400
pan/bi: Ensure the end NOP isn't eliminated
Otherwise the lowering doesn't work.
Signed-off-by: Alyssa Rosenzweig <alyssa at collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16410>
---
src/panfrost/bifrost/bifrost_compile.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/src/panfrost/bifrost/bifrost_compile.c b/src/panfrost/bifrost/bifrost_compile.c
index c76d2a1f6f2..787032cb1ba 100644
--- a/src/panfrost/bifrost/bifrost_compile.c
+++ b/src/panfrost/bifrost/bifrost_compile.c
@@ -4460,7 +4460,12 @@ static void
bi_lower_terminal_block(bi_context *ctx, bi_block *block)
{
bi_builder b = bi_init_builder(ctx, bi_after_block(block));
- bi_nop(&b);
+
+ /* Ensure the instruction is not dead code eliminated. XXX: This is a
+ * bit of a hack.
+ */
+ bi_instr *I = bi_nop(&b);
+ I->flow = 0xF;
}
static void
More information about the mesa-commit
mailing list