summaryrefslogtreecommitdiffstats
path: root/src/amd/common/ac_llvm_build.c
diff options
context:
space:
mode:
authorDave Airlie <[email protected]>2017-02-16 03:46:16 +0000
committerDave Airlie <[email protected]>2017-02-16 22:57:16 +0000
commit4617ad07e066c70950a1ace34ab62b6209db8836 (patch)
treebfa9310d229a11ef8a7822082d4aab1465ca5e71 /src/amd/common/ac_llvm_build.c
parente933331cd75d91449eda78edf3e830cd09ad9ee2 (diff)
radeon/ac: use llvm.amdgcn.sffbh intrinsic instead of AMDGPU.flbit.i32
Use the newer intrinsic. Reviewed-by: Edward O'Callaghan <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
Diffstat (limited to 'src/amd/common/ac_llvm_build.c')
-rw-r--r--src/amd/common/ac_llvm_build.c3
1 files changed, 2 insertions, 1 deletions
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);