[Mesa-dev] [PATCH] radeonsi: use llvm.amdgcn.s.barrier instead of llvm.AMDGPU.barrier.local

Michel Dänzer michel at daenzer.net
Mon Jan 25 19:07:57 PST 2016


On 26.01.2016 06:49, Nicolai Hähnle wrote:
> From: Nicolai Hähnle <nicolai.haehnle at amd.com>
> 
> The new name for the intrinsic was introduced in LLVM r258558.
> ---
>  src/gallium/drivers/radeonsi/si_shader.c | 7 ++++++-
>  1 file changed, 6 insertions(+), 1 deletion(-)
> 
> diff --git a/src/gallium/drivers/radeonsi/si_shader.c b/src/gallium/drivers/radeonsi/si_shader.c
> index c365b14..0723693 100644
> --- a/src/gallium/drivers/radeonsi/si_shader.c
> +++ b/src/gallium/drivers/radeonsi/si_shader.c
> @@ -3465,7 +3465,12 @@ static void si_llvm_emit_barrier(const struct lp_build_tgsi_action *action,
>  {
>  	struct gallivm_state *gallivm = bld_base->base.gallivm;
>  
> -	lp_build_intrinsic(gallivm->builder, "llvm.AMDGPU.barrier.local",
> +	lp_build_intrinsic(gallivm->builder,
> +#if HAVE_LLVM >= 0x0309
> +			"llvm.amdgcn.s.barrier",
> +#else
> +			"llvm.AMDGPU.barrier.local",
> +#endif
>  			LLVMVoidTypeInContext(gallivm->context), NULL, 0,
>  			LLVMNoUnwindAttribute);
>  }
> 

Reviewed-by: Michel Dänzer <michel.daenzer at amd.com>


-- 
Earthling Michel Dänzer               |               http://www.amd.com
Libre software enthusiast             |             Mesa and X developer


More information about the mesa-dev mailing list