summaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
authorTomeu Vizoso <[email protected]>2019-04-22 17:06:24 +0200
committerAlyssa Rosenzweig <[email protected]>2019-05-02 15:29:48 +0000
commitad7c9ba0ecb349763ab7fad7bce74f1d47c139e3 (patch)
treea7be1c8e1f25a411680721b17fdff12feb540cab /src/gallium
parenta5dddc2d42163420fe6476c118c32deaa62fc2c5 (diff)
panfrost/midgard: Skip liveness analysis for instructions without dest
[Alyssa: Add comment explanation] Signed-off-by: Tomeu Vizoso <[email protected]> Reviewed-by: Alyssa Rosenzweig <[email protected]>
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/drivers/panfrost/midgard/midgard_compile.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/gallium/drivers/panfrost/midgard/midgard_compile.c b/src/gallium/drivers/panfrost/midgard/midgard_compile.c
index d4d26b9a25e..e1d2edf1670 100644
--- a/src/gallium/drivers/panfrost/midgard/midgard_compile.c
+++ b/src/gallium/drivers/panfrost/midgard/midgard_compile.c
@@ -2109,6 +2109,13 @@ allocate_registers(compiler_context *ctx)
mir_foreach_instr_in_block(block, ins) {
if (ins->compact_branch) continue;
+ /* Dest is < 0 for store_vary instructions, which break
+ * the usual SSA conventions. Liveness analysis doesn't
+ * make sense on these instructions, so skip them to
+ * avoid memory corruption */
+
+ if (ins->ssa_args.dest < 0) continue;
+
if (ins->ssa_args.dest < SSA_FIXED_MINIMUM) {
/* If this destination is not yet live, it is now since we just wrote it */