ac/nir: Fix compiler warning about uninitialized dw_addr.

Even switching the def's condition to be the same chip revision check as
the use, the compiler doesn't figure it out.  Just NULL-init it.

Fixes: ec53e52742 ("ac/nir: Add ES output to LDS for GFX9.")
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
This commit is contained in:
Eric Anholt 2018-02-10 10:37:37 +00:00
parent 7a83be4b28
commit 091bff8317
1 changed files with 1 additions and 1 deletions

View File

@ -6088,7 +6088,7 @@ handle_es_outputs_post(struct nir_to_llvm_context *ctx,
}
for (unsigned i = 0; i < RADEON_LLVM_MAX_OUTPUTS; ++i) {
LLVMValueRef dw_addr;
LLVMValueRef dw_addr = NULL;
LLVMValueRef *out_ptr = &ctx->nir->outputs[i * 4];
int param_index;
int length = 4;