From 048da693c59d43c0453c3c4ce54a698f8be3ad98 Mon Sep 17 00:00:00 2001 From: Evghenii Date: Wed, 5 Feb 2014 10:52:08 +0100 Subject: [PATCH] fix sqrt --- builtins/target-nvptx.ll | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/builtins/target-nvptx.ll b/builtins/target-nvptx.ll index 24b9c0e3..3bc2852e 100644 --- a/builtins/target-nvptx.ll +++ b/builtins/target-nvptx.ll @@ -651,7 +651,7 @@ minmax_vy(max, double, double) ;; sqrt/rsqrt/rcp declare float @llvm.nvvm.rsqrt.approx.f(float %f) nounwind readonly alwaysinline -declare float @llvm.sqrt.f32(float %f) nounwind readonly alwaysinline +declare float @llvm.nvvm.sqrt.f(float %f) nounwind readonly alwaysinline declare double @llvm.nvvm.rsqrt.approx.d(double %f) nounwind readonly alwaysinline declare double @llvm.sqrt.f64(double %f) nounwind readonly alwaysinline @@ -665,7 +665,7 @@ define float @__rcp_uniform_float(float) nounwind readonly alwaysinline { } ;; declare float @__sqrt_uniform_float(float) nounwind readnone define float @__sqrt_uniform_float(float) nounwind readonly alwaysinline { - %ret = call float @llvm.sqrt.f32(float %0) + %ret = call float @llvm.nvvm.sqrt.f(float %0) ; %ret = tail call float asm sideeffect "sqrt.approx.ftz.f32 $0, $1;", "=f,f"(float %0) nounwind readnone alwaysinline ret float %ret }