From 4617ad07e066c70950a1ace34ab62b6209db8836 Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Thu, 16 Feb 2017 03:46:16 +0000 Subject: [PATCH] radeon/ac: use llvm.amdgcn.sffbh intrinsic instead of AMDGPU.flbit.i32 MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Use the newer intrinsic. Reviewed-by: Edward O'Callaghan Reviewed-by: Marek Olšák Signed-off-by: Dave Airlie --- src/amd/common/ac_llvm_build.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/amd/common/ac_llvm_build.c b/src/amd/common/ac_llvm_build.c index 180fd2414a5..dda2c0b9421 100644 --- a/src/amd/common/ac_llvm_build.c +++ b/src/amd/common/ac_llvm_build.c @@ -769,7 +769,8 @@ ac_emit_imsb(struct ac_llvm_context *ctx, LLVMValueRef arg, LLVMTypeRef dst_type) { - LLVMValueRef msb = ac_emit_llvm_intrinsic(ctx, "llvm.AMDGPU.flbit.i32", + const char *intr_name = (HAVE_LLVM < 0x0400) ? "llvm.AMDGPU.flbit.i32" : "llvm.amdgcn.sffbh"; + LLVMValueRef msb = ac_emit_llvm_intrinsic(ctx, intr_name, dst_type, &arg, 1, AC_FUNC_ATTR_READNONE); -- 2.30.2