[Mesa-dev] [PATCH] radv: Use v4i32 variant of llvm.SI.load.const.

Dave Airlie airlied at gmail.com
Fri Jun 30 21:17:52 UTC 2017


Reviewed-by: Dave Airlie <airlied at redhat.com>


On 1 Jul. 2017 05:06, "Bas Nieuwenhuizen" <bas at basnieuwenhuizen.nl> wrote:

> We apparently still used v16i8 ....
>
> As radeonsi doesn't use it with LLVM version checks I don't think
> we need them either.
>
> Signed-off-by: Bas Nieuwenhuizen <basni at google.com>
> CC: Dave Airlie <airlied at redhat.com>
> ---
>  src/amd/common/ac_nir_to_llvm.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/src/amd/common/ac_nir_to_llvm.c b/src/amd/common/ac_nir_to_
> llvm.c
> index 2c5557c67f0..51daa3cff36 100644
> --- a/src/amd/common/ac_nir_to_llvm.c
> +++ b/src/amd/common/ac_nir_to_llvm.c
> @@ -2408,8 +2408,6 @@ static LLVMValueRef visit_load_ubo_buffer(struct
> nir_to_llvm_context *ctx,
>         LLVMValueRef offset = get_src(ctx, instr->src[1]);
>         int num_components = instr->num_components;
>
> -       rsrc = LLVMBuildBitCast(ctx->builder, rsrc,
> LLVMVectorType(ctx->i8, 16), "");
> -
>         if (instr->dest.ssa.bit_size == 64)
>                 num_components *= 2;
>
> @@ -2419,7 +2417,7 @@ static LLVMValueRef visit_load_ubo_buffer(struct
> nir_to_llvm_context *ctx,
>                         LLVMBuildAdd(ctx->builder, LLVMConstInt(ctx->i32,
> 4 * i, 0),
>                                      offset, "")
>                 };
> -               results[i] = ac_build_intrinsic(&ctx->ac,
> "llvm.SI.load.const", ctx->f32,
> +               results[i] = ac_build_intrinsic(&ctx->ac,
> "llvm.SI.load.const.v4i32", ctx->f32,
>                                                 params, 2,
>                                                 AC_FUNC_ATTR_READNONE |
>                                                 AC_FUNC_ATTR_LEGACY);
> --
> 2.13.2
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20170701/b8e6f0ed/attachment.html>


More information about the mesa-dev mailing list