ac: use the ac i64 llvm type
authorTimothy Arceri <tarceri@itsqueeze.com>
Thu, 2 Nov 2017 01:45:29 +0000 (12:45 +1100)
committerTimothy Arceri <tarceri@itsqueeze.com>
Fri, 3 Nov 2017 03:54:45 +0000 (14:54 +1100)
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com
Acked-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
src/amd/common/ac_nir_to_llvm.c

index c3c9d7a85948b646e6b0924105c4522d58c62544..2437ea05c1487d04785f11bc6d737b4d837ace3c 100644 (file)
@@ -134,7 +134,6 @@ struct nir_to_llvm_context {
        LLVMValueRef persp_sample, persp_center, persp_centroid;
        LLVMValueRef linear_sample, linear_center, linear_centroid;
 
-       LLVMTypeRef i64;
        LLVMTypeRef v2i32;
        LLVMTypeRef v3i32;
        LLVMTypeRef v4i32;
@@ -993,7 +992,6 @@ static void create_function(struct nir_to_llvm_context *ctx,
 
 static void setup_types(struct nir_to_llvm_context *ctx)
 {
-       ctx->i64 = LLVMIntTypeInContext(ctx->context, 64);
        ctx->v2i32 = LLVMVectorType(ctx->ac.i32, 2);
        ctx->v3i32 = LLVMVectorType(ctx->ac.i32, 3);
        ctx->v4i32 = LLVMVectorType(ctx->ac.i32, 4);
@@ -5331,7 +5329,7 @@ glsl_base_to_llvm_type(struct nir_to_llvm_context *ctx,
                return ctx->f32;
        case GLSL_TYPE_INT64:
        case GLSL_TYPE_UINT64:
-               return ctx->i64;
+               return ctx->ac.i64;
        case GLSL_TYPE_DOUBLE:
                return ctx->f64;
        default: