[Mesa-dev] [PATCH 4/4] radeon/ac: use llvm.amdgcn.sffbh intrinsic instead of AMDGPU.flbit.i32
Marek Olšák
maraeo at gmail.com
Thu Feb 16 10:25:12 UTC 2017
For 1, 3, 4:
Reviewed-by: Marek Olšák <marek.olsak at amd.com>
Marek
On Thu, Feb 16, 2017 at 4:48 AM, Dave Airlie <airlied at gmail.com> wrote:
> From: Dave Airlie <airlied at redhat.com>
>
> Use the newer intrinsic.
>
> Signed-off-by: Dave Airlie <airlied at redhat.com>
> ---
> 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 180fd24..dda2c0b 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.7.4
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
More information about the mesa-dev
mailing list