[Mesa-dev] [PATCH 2/2] ac: Silence a compiler warning about results[0].
Nicolai Hähnle
nhaehnle at gmail.com
Mon Oct 23 16:18:14 UTC 2017
Both patches:
Reviewed-by: Nicolai Hähnle <nicolai.haehnle at amd.com>
On 17.10.2017 22:50, Eric Anholt wrote:
> We know that num_components will be > 0, but it doesn't.
> ---
> src/amd/common/ac_nir_to_llvm.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/src/amd/common/ac_nir_to_llvm.c b/src/amd/common/ac_nir_to_llvm.c
> index 3ba3ebf051e2..07fa3fdf84b5 100644
> --- a/src/amd/common/ac_nir_to_llvm.c
> +++ b/src/amd/common/ac_nir_to_llvm.c
> @@ -2390,6 +2390,7 @@ static LLVMValueRef visit_load_buffer(struct ac_nir_context *ctx,
>
> }
>
> + assume(results[0]);
> LLVMValueRef ret = results[0];
> if (num_components > 4 || num_components == 3) {
> LLVMValueRef masks[] = {
>
--
Lerne, wie die Welt wirklich ist,
Aber vergiss niemals, wie sie sein sollte.
More information about the mesa-dev
mailing list