1 ; RUN: llc < %s -march=nvptx -mcpu=sm_20 | FileCheck %s
3 target triple = "nvptx-nvidia-cuda"
5 ; Function Attrs: nounwind
7 define void @foo(float* nocapture %a) #0 {
8 %val = load float, float* %a
9 %tan = tail call fastcc float @__nv_fast_tanf(float %val)
10 store float %tan, float* %a
14 ; Function Attrs: nounwind readnone
15 declare float @llvm.nvvm.sin.approx.ftz.f(float) #1
17 ; Function Attrs: nounwind readnone
18 declare float @llvm.nvvm.cos.approx.ftz.f(float) #1
20 ; Function Attrs: nounwind readnone
21 declare float @llvm.nvvm.div.approx.ftz.f(float, float) #1
23 ; Function Attrs: alwaysinline inlinehint nounwind readnone
24 ; CHECK: .func (.param .b32 func_retval0) __nv_fast_tanf
25 define internal fastcc float @__nv_fast_tanf(float %a) #2 {
27 %0 = tail call float @llvm.nvvm.sin.approx.ftz.f(float %a)
28 %1 = tail call float @llvm.nvvm.cos.approx.ftz.f(float %a)
29 %2 = tail call float @llvm.nvvm.div.approx.ftz.f(float %0, float %1)
33 attributes #0 = { nounwind }
34 attributes #1 = { nounwind readnone }
35 attributes #2 = { alwaysinline inlinehint nounwind readnone }
37 !nvvm.annotations = !{!0}
39 !0 = !{void (float*)* @foo, !"kernel", i32 1}