gallium/radeon: simplify radeon_llvm_emit_fetch for direct array addressing
authorNicolai Hähnle <nicolai.haehnle@amd.com>
Mon, 8 Aug 2016 17:52:46 +0000 (19:52 +0200)
committerNicolai Hähnle <nicolai.haehnle@amd.com>
Wed, 17 Aug 2016 10:11:22 +0000 (12:11 +0200)
We can use the pointer stored in the temps array directly.

Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
src/gallium/drivers/radeon/radeon_setup_tgsi_llvm.c

index 41f24d3653d6e82ac9ac36ec2c9669c0b2b45203..e084248920bc4147fab1298378937f956273a7fc 100644 (file)
@@ -359,11 +359,6 @@ LLVMValueRef radeon_llvm_emit_fetch(struct lp_build_tgsi_context *bld_base,
                                                 LLVMBuildLoad(builder, ptr, ""),
                                                 LLVMBuildLoad(builder, ptr2, ""));
                }
-               LLVMValueRef array = get_alloca_for_array(bld_base, reg->Register.File, reg->Register.Index);
-               if (array) {
-                       return bitcast(bld_base, type, load_value_from_array(bld_base, reg->Register.File, type,
-                                       swizzle, reg->Register.Index, NULL));
-               }
                result = LLVMBuildLoad(builder, ptr, "");
                break;