diff options
author | Marek Olšák <marek.olsak@amd.com> | 2018-08-15 21:06:54 -0400 |
---|---|---|
committer | Marek Olšák <marek.olsak@amd.com> | 2018-08-21 20:50:37 -0400 |
commit | d87fe1f0fd76686d678279517ad3ca5fabab24f9 (patch) | |
tree | fcf2a1d35060a51f58d951f3c66147f5ba2d41c3 /src/gallium/drivers/radeonsi/si_shader_tgsi_setup.c | |
parent | 60beac9efcf40144c86fc85258e7a1bf5518d20f (diff) |
ac,radeonsi: use ac_build_gather_values more
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Diffstat (limited to 'src/gallium/drivers/radeonsi/si_shader_tgsi_setup.c')
-rw-r--r-- | src/gallium/drivers/radeonsi/si_shader_tgsi_setup.c | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/src/gallium/drivers/radeonsi/si_shader_tgsi_setup.c b/src/gallium/drivers/radeonsi/si_shader_tgsi_setup.c index 1f37b0ba37d..20164939cb7 100644 --- a/src/gallium/drivers/radeonsi/si_shader_tgsi_setup.c +++ b/src/gallium/drivers/radeonsi/si_shader_tgsi_setup.c @@ -305,18 +305,11 @@ si_llvm_emit_fetch_64bit(struct lp_build_tgsi_context *bld_base, LLVMValueRef ptr2) { struct si_shader_context *ctx = si_shader_context(bld_base); - LLVMValueRef result; - - result = LLVMGetUndef(LLVMVectorType(ctx->i32, 2)); - - result = LLVMBuildInsertElement(ctx->ac.builder, - result, - ac_to_integer(&ctx->ac, ptr), - ctx->i32_0, ""); - result = LLVMBuildInsertElement(ctx->ac.builder, - result, - ac_to_integer(&ctx->ac, ptr2), - ctx->i32_1, ""); + LLVMValueRef values[2] = { + ac_to_integer(&ctx->ac, ptr), + ac_to_integer(&ctx->ac, ptr2), + }; + LLVMValueRef result = ac_build_gather_values(&ctx->ac, values, 2); return LLVMBuildBitCast(ctx->ac.builder, result, type, ""); } |