From: Marek Olšák Date: Thu, 25 Jul 2019 00:21:27 +0000 (-0400) Subject: ac/nir: fix incorrect Phis if callbacks use control flow inside control flow X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=033c39a660f959f55290949b88c091ded647e7f2;p=mesa.git ac/nir: fix incorrect Phis if callbacks use control flow inside control flow --- 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)