[Mesa-dev] [PATCH 2/2] ac: Silence a compiler warning about results[0].
Eric Anholt
eric at anholt.net
Tue Oct 17 20:50:39 UTC 2017
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[] = {
--
2.14.2
More information about the mesa-dev
mailing list