ac/llvm: Fix nonportable sizeof.
authorVinson Lee <vlee@freedesktop.org>
Fri, 11 Sep 2020 00:52:16 +0000 (17:52 -0700)
committerVinson Lee <vlee@freedesktop.org>
Mon, 14 Sep 2020 22:25:45 +0000 (15:25 -0700)
commit50f1cd40767469c96628331aa0ce91fcde328030
treeab9e99871c78ae029e48ee62623a94d002a68bb8
parent16e788416f05ac3347af99e0715e96e42f616be8
ac/llvm: Fix nonportable sizeof.

Fix defect reported by Coverity.

Sizeof not portable (SIZEOF_MISMATCH)
suspicious_sizeof: Passing argument vec_size * 8UL /* sizeof
(LLVMValueRef *) */ to function __builtin_alloca and then casting
the return value to LLVMValueRef * is suspicious. In this
particular case sizeof (LLVMValueRef *) happens to be equal to
sizeof (LLVMValueRef), but this is not a portable assumption.

Fixes: ca74603b4f6e ("ac/llvm: add better code for isign")
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6682>
src/amd/llvm/ac_llvm_build.c