~pali/+junk/llvm-toolchain-3.7

« back to all changes in this revision

Viewing changes to test/CodeGen/NVPTX/simple-call.ll

  • Committer: Package Import Robot
  • Author(s): Sylvestre Ledru
  • Date: 2015-07-15 17:51:08 UTC
  • Revision ID: package-import@ubuntu.com-20150715175108-l8mynwovkx4zx697
Tags: upstream-3.7~+rc2
ImportĀ upstreamĀ versionĀ 3.7~+rc2

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
; RUN: llc < %s -march=nvptx -mcpu=sm_20 | FileCheck %s
 
2
; RUN: llc < %s -march=nvptx64 -mcpu=sm_20 | FileCheck %s
 
3
 
 
4
 
 
5
 
 
6
; CHECK: .func ({{.*}}) device_func
 
7
define float @device_func(float %a) noinline {
 
8
  %ret = fmul float %a, %a
 
9
  ret float %ret
 
10
}
 
11
 
 
12
; CHECK: .entry kernel_func
 
13
define void @kernel_func(float* %a) {
 
14
  %val = load float, float* %a
 
15
; CHECK: call.uni (retval0),
 
16
; CHECK: device_func,
 
17
  %mul = call float @device_func(float %val)
 
18
  store float %mul, float* %a
 
19
  ret void
 
20
}
 
21
 
 
22
 
 
23
 
 
24
!nvvm.annotations = !{!1}
 
25
 
 
26
!1 = !{void (float*)* @kernel_func, !"kernel", i32 1}