ac/nir: remove useless integer cast in visit_image_load()
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Wed, 10 Apr 2019 15:16:54 +0000 (17:16 +0200)
committerSamuel Pitoiset <samuel.pitoiset@gmail.com>
Fri, 12 Apr 2019 15:30:55 +0000 (17:30 +0200)
ac_build_image_opcode() casts if necessary and buffer images
are casted too.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
src/amd/common/ac_nir_to_llvm.c

index f51e07d531dccec7c14482c830bf92a73cd97c89..546d43979ceda12a8393f8f14c5b4a4623ac9788 100644 (file)
@@ -2550,7 +2550,7 @@ static LLVMValueRef visit_image_load(struct ac_nir_context *ctx,
 
                res = ac_build_image_opcode(&ctx->ac, &args);
        }
-       return ac_to_integer(&ctx->ac, res);
+       return res;
 }
 
 static void visit_image_store(struct ac_nir_context *ctx,