Mesa (master): radeonsi: use llvm.amdgcn.s.barrier instead of llvm.AMDGPU.barrier.local

Nicolai Hähnle nh at kemper.freedesktop.org
Tue Jan 26 14:57:27 UTC 2016


Module: Mesa
Branch: master
Commit: 8894b5f0086cd80e7b5ccbe350d94e02fe4f4adf
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=8894b5f0086cd80e7b5ccbe350d94e02fe4f4adf

Author: Nicolai Hähnle <nicolai.haehnle at amd.com>
Date:   Mon Jan 25 14:11:07 2016 -0500

radeonsi: use llvm.amdgcn.s.barrier instead of llvm.AMDGPU.barrier.local

The new name for the intrinsic was introduced in LLVM r258558.

v2: use ternary operator instead of preprocessor

Reviewed-by: Michel Dänzer <michel.daenzer at amd.com> (v1)
Reviewed-by: Marek Olšák <marek.olsak at amd.com>

---

 src/gallium/drivers/radeonsi/si_shader.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/gallium/drivers/radeonsi/si_shader.c b/src/gallium/drivers/radeonsi/si_shader.c
index c365b14..94c1129 100644
--- a/src/gallium/drivers/radeonsi/si_shader.c
+++ b/src/gallium/drivers/radeonsi/si_shader.c
@@ -3465,7 +3465,9 @@ 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,
+			HAVE_LLVM >= 0x0309 ? "llvm.amdgcn.s.barrier"
+					    : "llvm.AMDGPU.barrier.local",
 			LLVMVoidTypeInContext(gallivm->context), NULL, 0,
 			LLVMNoUnwindAttribute);
 }




More information about the mesa-commit mailing list