Mesa (staging/20.1): pan/bi: Fix emit_if successor assignment
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Mon Jun 1 16:45:52 UTC 2020
Module: Mesa
Branch: staging/20.1
Commit: 419b7ccba1355135797dd068052bb199cd0a7bfb
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=419b7ccba1355135797dd068052bb199cd0a7bfb
Author: Alyssa Rosenzweig <alyssa.rosenzweig at collabora.com>
Date: Wed May 27 18:27:08 2020 -0400
pan/bi: Fix emit_if successor assignment
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig at collabora.com>
Fixes: 9a00cf3d1ef ("pan/bi: Add support for if-else blocks")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5260>
(cherry picked from commit e42a5dfd4f2b22c73f4627128ac6d3dbcb10aca1)
---
.pick_status.json | 2 +-
src/panfrost/bifrost/bifrost_compile.c | 5 ++---
2 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/.pick_status.json b/.pick_status.json
index 991e940af8d..b7a3b94e115 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -364,7 +364,7 @@
"description": "pan/bi: Fix emit_if successor assignment",
"nominated": true,
"nomination_type": 1,
- "resolution": 0,
+ "resolution": 1,
"master_sha": null,
"because_sha": "9a00cf3d1efe336e09906d87a8f5a50cbbe10fd6"
},
diff --git a/src/panfrost/bifrost/bifrost_compile.c b/src/panfrost/bifrost/bifrost_compile.c
index 1586bdcbe2c..a5e86d81619 100644
--- a/src/panfrost/bifrost/bifrost_compile.c
+++ b/src/panfrost/bifrost/bifrost_compile.c
@@ -891,18 +891,17 @@ emit_if(bi_context *ctx, nir_if *nif)
/* The else block is empty, so don't emit an exit jump */
bi_remove_instruction(then_exit);
then_branch->branch.target = ctx->after_block;
+ pan_block_add_successor(&end_then_block->base, &ctx->after_block->base); /* fallthrough */
} else {
then_branch->branch.target = else_block;
then_exit->branch.target = ctx->after_block;
pan_block_add_successor(&end_then_block->base, &then_exit->branch.target->base);
+ pan_block_add_successor(&end_else_block->base, &ctx->after_block->base); /* fallthrough */
}
- /* Wire up the successors */
-
pan_block_add_successor(&before_block->base, &then_branch->branch.target->base); /* then_branch */
pan_block_add_successor(&before_block->base, &then_block->base); /* fallthrough */
- pan_block_add_successor(&end_else_block->base, &ctx->after_block->base); /* fallthrough */
}
static void
More information about the mesa-commit
mailing list