summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2019-07-24 20:21:27 -0400
committerMarek Olšák <[email protected]>2019-07-30 22:06:23 -0400
commit033c39a660f959f55290949b88c091ded647e7f2 (patch)
tree0336de72fcc730b02485a7924f9285fd2b5858b0 /src
parentd3c80733cdfe8552b2f447ec8ed62465d0f2af1a (diff)
ac/nir: fix incorrect Phis if callbacks use control flow inside control flow
Diffstat (limited to 'src')
-rw-r--r--src/amd/common/ac_nir_to_llvm.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/amd/common/ac_nir_to_llvm.c b/src/amd/common/ac_nir_to_llvm.c
index 34d9b83e85b..c2b5254aa7c 100644
--- a/src/amd/common/ac_nir_to_llvm.c
+++ b/src/amd/common/ac_nir_to_llvm.c
@@ -4276,7 +4276,6 @@ static void visit_cf_list(struct ac_nir_context *ctx,
static void visit_block(struct ac_nir_context *ctx, nir_block *block)
{
- LLVMBasicBlockRef llvm_block = LLVMGetInsertBlock(ctx->ac.builder);
nir_foreach_instr(instr, block)
{
switch (instr->type) {
@@ -4312,7 +4311,8 @@ static void visit_block(struct ac_nir_context *ctx, nir_block *block)
}
}
- _mesa_hash_table_insert(ctx->defs, block, llvm_block);
+ _mesa_hash_table_insert(ctx->defs, block,
+ LLVMGetInsertBlock(ctx->ac.builder));
}
static void visit_if(struct ac_nir_context *ctx, nir_if *if_stmt)