ac: remove deprecated use of LLVMInt1Type()
authorMarek Olšák <marek.olsak@amd.com>
Wed, 29 Aug 2018 04:17:26 +0000 (00:17 -0400)
committerMarek Olšák <marek.olsak@amd.com>
Mon, 10 Sep 2018 19:19:56 +0000 (15:19 -0400)
Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de>
src/amd/common/ac_nir_to_llvm.c

index 192ef079215c081505c4dd340f57d9be33ed0641..18644107eb47aef7f01f9f3a98d9fd5733f08d3b 100644 (file)
@@ -1397,7 +1397,7 @@ static LLVMValueRef visit_load_push_constant(struct ac_nir_context *ctx,
                LLVMValueRef res = LLVMBuildLoad(ctx->ac.builder, ptr, "");
                res = LLVMBuildBitCast(ctx->ac.builder, res, vec_type, "");
                LLVMValueRef cond = LLVMBuildLShr(ctx->ac.builder, addr, ctx->ac.i32_1, "");
-               cond = LLVMBuildTrunc(ctx->ac.builder, cond, LLVMInt1Type(), "");
+               cond = LLVMBuildTrunc(ctx->ac.builder, cond, ctx->ac.i1, "");
                LLVMValueRef mask[] = { LLVMConstInt(ctx->ac.i32, 0, false), LLVMConstInt(ctx->ac.i32, 1, false),
                                        LLVMConstInt(ctx->ac.i32, 2, false), LLVMConstInt(ctx->ac.i32, 3, false),
                                        LLVMConstInt(ctx->ac.i32, 4, false)};