~pali/+junk/llvm-toolchain-3.7

« back to all changes in this revision

Viewing changes to test/CodeGen/AMDGPU/llvm.rint.f64.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 -march=amdgcn -mcpu=tonga -verify-machineinstrs < %s | FileCheck -check-prefix=CI -check-prefix=FUNC %s
 
2
; RUN: llc -march=amdgcn -mcpu=bonaire -verify-machineinstrs < %s | FileCheck -check-prefix=CI -check-prefix=FUNC %s
 
3
; RUN: llc -march=amdgcn -mcpu=SI -verify-machineinstrs < %s | FileCheck -check-prefix=SI -check-prefix=FUNC %s
 
4
 
 
5
; FUNC-LABEL: {{^}}rint_f64:
 
6
; CI: v_rndne_f64_e32
 
7
 
 
8
; SI-DAG: v_add_f64
 
9
; SI-DAG: v_add_f64
 
10
; SI-DAG v_cmp_gt_f64_e64
 
11
; SI: v_cndmask_b32
 
12
; SI: v_cndmask_b32
 
13
; SI: s_endpgm
 
14
define void @rint_f64(double addrspace(1)* %out, double %in) {
 
15
entry:
 
16
  %0 = call double @llvm.rint.f64(double %in)
 
17
  store double %0, double addrspace(1)* %out
 
18
  ret void
 
19
}
 
20
 
 
21
; FUNC-LABEL: {{^}}rint_v2f64:
 
22
; CI: v_rndne_f64_e32
 
23
; CI: v_rndne_f64_e32
 
24
define void @rint_v2f64(<2 x double> addrspace(1)* %out, <2 x double> %in) {
 
25
entry:
 
26
  %0 = call <2 x double> @llvm.rint.v2f64(<2 x double> %in)
 
27
  store <2 x double> %0, <2 x double> addrspace(1)* %out
 
28
  ret void
 
29
}
 
30
 
 
31
; FUNC-LABEL: {{^}}rint_v4f64:
 
32
; CI: v_rndne_f64_e32
 
33
; CI: v_rndne_f64_e32
 
34
; CI: v_rndne_f64_e32
 
35
; CI: v_rndne_f64_e32
 
36
define void @rint_v4f64(<4 x double> addrspace(1)* %out, <4 x double> %in) {
 
37
entry:
 
38
  %0 = call <4 x double> @llvm.rint.v4f64(<4 x double> %in)
 
39
  store <4 x double> %0, <4 x double> addrspace(1)* %out
 
40
  ret void
 
41
}
 
42
 
 
43
 
 
44
declare double @llvm.rint.f64(double) #0
 
45
declare <2 x double> @llvm.rint.v2f64(<2 x double>) #0
 
46
declare <4 x double> @llvm.rint.v4f64(<4 x double>) #0