summaryrefslogtreecommitdiffstats
path: root/src/amd/common
diff options
context:
space:
mode:
authorTimothy Arceri <[email protected]>2018-01-18 15:46:35 +1100
committerTimothy Arceri <[email protected]>2018-01-18 15:59:27 +1100
commit9248f72c4e8513fdf4ac4cac4b78c9f06621046a (patch)
treebf53d08b6dd83b9aa3887c90b22fe53b53c70301 /src/amd/common
parent4c69961daf45a6a64970e5831bd362307dca0cb2 (diff)
ac: tidy up array indexing logic
Reviewed-by: Bas Nieuwenhuizen <[email protected]>
Diffstat (limited to 'src/amd/common')
-rw-r--r--src/amd/common/ac_nir_to_llvm.c6
1 files changed, 1 insertions, 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]);