From: Eli Bendersky Date: Tue, 17 Dec 2013 14:14:15 +0000 (+0000) Subject: Fix code sample in NVPTX examples: now it compiles to PTX and runs as expected. X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=352168c57ec450c4962ee336edacc57a982aae84;p=oota-llvm.git Fix code sample in NVPTX examples: now it compiles to PTX and runs as expected. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197498 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/docs/NVPTXUsage.rst b/docs/NVPTXUsage.rst index a9065ce74ba..b081c5a7ae5 100644 --- a/docs/NVPTXUsage.rst +++ b/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: