From c0acb596f45624e2bc9ba7285e20bc744a532dbe Mon Sep 17 00:00:00 2001 From: =?utf8?q?Nicolai=20H=C3=A4hnle?= Date: Tue, 1 May 2018 11:06:18 +0200 Subject: [PATCH] amd/common: use llvm.amdgcn.wqm for explicit derivatives To comply with an upcoming change in LLVM, see https://reviews.llvm.org/D46051 Reviewed-by: Bas Nieuwenhuizen --- src/amd/common/ac_llvm_build.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/amd/common/ac_llvm_build.c b/src/amd/common/ac_llvm_build.c index f21a5d2623c..c9b2e36b632 100644 --- a/src/amd/common/ac_llvm_build.c +++ b/src/amd/common/ac_llvm_build.c @@ -1248,6 +1248,13 @@ ac_build_ddxy(struct ac_llvm_context *ctx, tl = LLVMBuildBitCast(ctx->builder, tl, ctx->f32, ""); trbl = LLVMBuildBitCast(ctx->builder, trbl, ctx->f32, ""); result = LLVMBuildFSub(ctx->builder, trbl, tl, ""); + + if (HAVE_LLVM >= 0x0700) { + result = ac_build_intrinsic(ctx, + "llvm.amdgcn.wqm.f32", ctx->f32, + &result, 1, 0); + } + return result; } -- 2.30.2