From: Marek Olšák Date: Thu, 9 Jan 2020 02:52:26 +0000 (-0500) Subject: radeonsi: work around an LLVM crash when using llvm.amdgcn.icmp.i64.i1 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=8ff8e68e422a5c6b9ab26eaa56eff5c27a642d2e;p=mesa.git radeonsi: work around an LLVM crash when using llvm.amdgcn.icmp.i64.i1 Cc: 19.2 19.3 Acked-by: Pierre-Eric Pelloux-Prayer Tested-by: Marge Bot Part-of: --- diff --git a/src/gallium/drivers/radeonsi/si_compute_prim_discard.c b/src/gallium/drivers/radeonsi/si_compute_prim_discard.c index 4e691d088c2..2fcec436bb0 100644 --- a/src/gallium/drivers/radeonsi/si_compute_prim_discard.c +++ b/src/gallium/drivers/radeonsi/si_compute_prim_discard.c @@ -718,6 +718,7 @@ void si_build_prim_discard_compute_shader(struct si_shader_context *ctx) ac_get_arg(&ctx->ac, param_smallprim_precision), &options); + ac_build_optimization_barrier(&ctx->ac, &accepted); LLVMValueRef accepted_threadmask = ac_get_i1_sgpr_mask(&ctx->ac, accepted); /* Count the number of active threads by doing bitcount(accepted). */