From 3fbdcd942fe2ca9095532b0663bfa96316663141 Mon Sep 17 00:00:00 2001 From: Samuel Pitoiset Date: Fri, 2 Nov 2018 09:50:32 +0100 Subject: amd: remove support for LLVM 6.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit User are encouraged to switch to LLVM 7.0 released in September 2018. Signed-off-by: Samuel Pitoiset Reviewed-by: Marek Olšák --- src/amd/common/ac_nir_to_llvm.c | 24 +++++++++--------------- 1 file changed, 9 insertions(+), 15 deletions(-) (limited to 'src/amd/common/ac_nir_to_llvm.c') diff --git a/src/amd/common/ac_nir_to_llvm.c b/src/amd/common/ac_nir_to_llvm.c index fe65dfff8f3..4294956de13 100644 --- a/src/amd/common/ac_nir_to_llvm.c +++ b/src/amd/common/ac_nir_to_llvm.c @@ -429,22 +429,16 @@ static LLVMValueRef emit_bitfield_extract(struct ac_llvm_context *ctx, { LLVMValueRef result; - if (HAVE_LLVM < 0x0700) { - LLVMValueRef icond = LLVMBuildICmp(ctx->builder, LLVMIntEQ, srcs[2], LLVMConstInt(ctx->i32, 32, false), ""); - result = ac_build_bfe(ctx, srcs[0], srcs[1], srcs[2], is_signed); - result = LLVMBuildSelect(ctx->builder, icond, srcs[0], result, ""); - } else { - /* FIXME: LLVM 7 returns incorrect result when count is 0. - * https://bugs.freedesktop.org/show_bug.cgi?id=107276 - */ - LLVMValueRef zero = ctx->i32_0; - LLVMValueRef icond1 = LLVMBuildICmp(ctx->builder, LLVMIntEQ, srcs[2], LLVMConstInt(ctx->i32, 32, false), ""); - LLVMValueRef icond2 = LLVMBuildICmp(ctx->builder, LLVMIntEQ, srcs[2], zero, ""); + /* FIXME: LLVM 7+ returns incorrect result when count is 0. + * https://bugs.freedesktop.org/show_bug.cgi?id=107276 + */ + LLVMValueRef zero = ctx->i32_0; + LLVMValueRef icond1 = LLVMBuildICmp(ctx->builder, LLVMIntEQ, srcs[2], LLVMConstInt(ctx->i32, 32, false), ""); + LLVMValueRef icond2 = LLVMBuildICmp(ctx->builder, LLVMIntEQ, srcs[2], zero, ""); - result = ac_build_bfe(ctx, srcs[0], srcs[1], srcs[2], is_signed); - result = LLVMBuildSelect(ctx->builder, icond1, srcs[0], result, ""); - result = LLVMBuildSelect(ctx->builder, icond2, zero, result, ""); - } + result = ac_build_bfe(ctx, srcs[0], srcs[1], srcs[2], is_signed); + result = LLVMBuildSelect(ctx->builder, icond1, srcs[0], result, ""); + result = LLVMBuildSelect(ctx->builder, icond2, zero, result, ""); return result; } -- cgit v1.2.3