ac: add 16-bit constant values for zero and one
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Fri, 14 Sep 2018 10:52:34 +0000 (12:52 +0200)
committerSamuel Pitoiset <samuel.pitoiset@gmail.com>
Mon, 17 Sep 2018 13:18:26 +0000 (15:18 +0200)
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
src/amd/common/ac_llvm_build.c
src/amd/common/ac_llvm_build.h

index a99314266c2a9d18cb0edc9e977535b2ce7b936e..011cea5cd0fe9fe2b6ac020524ef66c94a5a8976 100644 (file)
@@ -87,6 +87,8 @@ ac_llvm_context_init(struct ac_llvm_context *ctx,
        ctx->v4f32 = LLVMVectorType(ctx->f32, 4);
        ctx->v8i32 = LLVMVectorType(ctx->i32, 8);
 
+       ctx->i16_0 = LLVMConstInt(ctx->i16, 0, false);
+       ctx->i16_1 = LLVMConstInt(ctx->i16, 1, false);
        ctx->i32_0 = LLVMConstInt(ctx->i32, 0, false);
        ctx->i32_1 = LLVMConstInt(ctx->i32, 1, false);
        ctx->i64_0 = LLVMConstInt(ctx->i64, 0, false);
index 8524d1fa769b9727d99355bb625b0236e4f1ef3d..0df9234c664d95b863fc541160b53f30586ffc8a 100644 (file)
@@ -74,6 +74,8 @@ struct ac_llvm_context {
        LLVMTypeRef v4f32;
        LLVMTypeRef v8i32;
 
+       LLVMValueRef i16_0;
+       LLVMValueRef i16_1;
        LLVMValueRef i32_0;
        LLVMValueRef i32_1;
        LLVMValueRef i64_0;