ac: Silence a compiler warning about results[0].
authorEric Anholt <eric@anholt.net>
Tue, 17 Oct 2017 20:46:50 +0000 (13:46 -0700)
committerEric Anholt <eric@anholt.net>
Mon, 23 Oct 2017 17:14:40 +0000 (10:14 -0700)
We know that num_components will be > 0, but it doesn't.

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
src/amd/common/ac_nir_to_llvm.c

index 2ddc748b5beec6c0bd24ce04f52eaf886ed12d89..2e50e50b129301a99d478d03aca0b89e59cd4201 100644 (file)
@@ -2541,6 +2541,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[] = {