From 9248f72c4e8513fdf4ac4cac4b78c9f06621046a Mon Sep 17 00:00:00 2001 From: Timothy Arceri Date: Thu, 18 Jan 2018 15:46:35 +1100 Subject: [PATCH] ac: tidy up array indexing logic Reviewed-by: Bas Nieuwenhuizen --- src/amd/common/ac_nir_to_llvm.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/amd/common/ac_nir_to_llvm.c b/src/amd/common/ac_nir_to_llvm.c index e07330ca5c8..c53fb5cb1cd 100644 --- a/src/amd/common/ac_nir_to_llvm.c +++ b/src/amd/common/ac_nir_to_llvm.c @@ -2588,11 +2588,7 @@ static LLVMValueRef visit_load_buffer(struct ac_nir_context *ctx, ctx->ac.i1false, }; - int idx = i; - if (instr->dest.ssa.bit_size == 64) - idx = i > 1 ? 1 : 0; - - results[idx] = ac_build_intrinsic(&ctx->ac, load_name, data_type, params, 5, 0); + results[i > 0 ? 1 : 0] = ac_build_intrinsic(&ctx->ac, load_name, data_type, params, 5, 0); } assume(results[0]); -- 2.30.2