[Mesa-dev] [PATCH v3 20/20] ac: rework ac_llvm_extract_elem()
Marek Olšák
maraeo at gmail.com
Thu Jan 4 18:42:03 UTC 2018
This is a very good series. Patches 18 and 19 need some tiny changes.
With my comments on patches 8 and 12 addressed:
Patch 1-17, 20 are:
Reviewed-by: Marek Olšák <marek.olsak at amd.com>
Marek
On Wed, Jan 3, 2018 at 6:04 AM, Timothy Arceri <tarceri at itsqueeze.com> wrote:
> Simplifies the logic a little and asserts index is 0.
>
> Suggested-by: Nicolai Hähnle <nhaehnle at gmail.com>
> ---
> src/amd/common/ac_llvm_build.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/src/amd/common/ac_llvm_build.c b/src/amd/common/ac_llvm_build.c
> index 0ea5e7f4ca..8a3a2abf17 100644
> --- a/src/amd/common/ac_llvm_build.c
> +++ b/src/amd/common/ac_llvm_build.c
> @@ -114,10 +114,10 @@ ac_llvm_extract_elem(struct ac_llvm_context *ac,
> LLVMValueRef value,
> int index)
> {
> - int count = ac_get_llvm_num_components(value);
> -
> - if (count == 1)
> + if (LLVMGetTypeKind(LLVMTypeOf(value)) != LLVMVectorTypeKind) {
> + assert(index == 0);
> return value;
> + }
>
> return LLVMBuildExtractElement(ac->builder, value,
> LLVMConstInt(ac->i32, index, false), "");
> --
> 2.14.3
>
> _______________________________________________
> 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