From b512b968e6c9fd6f9dafa4a4f34c2c0548922b9e Mon Sep 17 00:00:00 2001 From: Eli Bendersky Date: Tue, 17 Dec 2013 14:14:15 +0000 Subject: [PATCH] Fix code sample in NVPTX examples: now it compiles to PTX and runs as expected. llvm-svn: 197498 --- llvm/docs/NVPTXUsage.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/llvm/docs/NVPTXUsage.rst b/llvm/docs/NVPTXUsage.rst index a9065ce..b081c5a 100644 --- a/llvm/docs/NVPTXUsage.rst +++ b/llvm/docs/NVPTXUsage.rst @@ -839,7 +839,7 @@ Libdevice provides an ``__nv_powf`` function that we will use. %valB = load float addrspace(1)* %ptrB, align 4 ; Compute C = pow(A, B) - %valC = call float @__nv_exp2f(float %valA, float %valB) + %valC = call float @__nv_powf(float %valA, float %valB) ; Store back to C store float %valC, float addrspace(1)* %ptrC, align 4 @@ -850,7 +850,7 @@ Libdevice provides an ``__nv_powf`` function that we will use. !nvvm.annotations = !{!0} !0 = metadata !{void (float addrspace(1)*, float addrspace(1)*, - float addrspace(1)*)* @kernel, metadata !"kernel", i32 1}% + float addrspace(1)*)* @kernel, metadata !"kernel", i32 1} To compile this kernel, we perform the following steps: -- 2.7.4