Mesa (master): ac: Silence a compiler warning about results[0].
Eric Anholt
anholt at kemper.freedesktop.org
Mon Oct 23 17:15:53 UTC 2017
Module: Mesa
Branch: master
Commit: ba85525fcec65e021304a7ecd21e8fd20ce39f2d
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=ba85525fcec65e021304a7ecd21e8fd20ce39f2d
Author: Eric Anholt <eric at anholt.net>
Date: Tue Oct 17 13:46:50 2017 -0700
ac: Silence a compiler warning about results[0].
We know that num_components will be > 0, but it doesn't.
Reviewed-by: Nicolai Hähnle <nicolai.haehnle at amd.com>
---
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 2ddc748b5b..2e50e50b12 100644
--- a/src/amd/common/ac_nir_to_llvm.c
+++ b/src/amd/common/ac_nir_to_llvm.c
@@ -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[] = {
More information about the mesa-commit
mailing list