• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; RUN: llc -march=r600 -mcpu=SI -verify-machineinstrs < %s
2; RUN: llc -march=r600 -mcpu=bonaire -verify-machineinstrs < %s
3
4; This should have the exactly the same output as the test for rint,
5; so no need to check anything.
6
7declare float @llvm.nearbyint.f32(float) #0
8declare <2 x float> @llvm.nearbyint.v2f32(<2 x float>) #0
9declare <4 x float> @llvm.nearbyint.v4f32(<4 x float>) #0
10declare double @llvm.nearbyint.f64(double) #0
11declare <2 x double> @llvm.nearbyint.v2f64(<2 x double>) #0
12declare <4 x double> @llvm.nearbyint.v4f64(<4 x double>) #0
13
14
15define void @fnearbyint_f32(float addrspace(1)* %out, float %in) #1 {
16entry:
17  %0 = call float @llvm.nearbyint.f32(float %in)
18  store float %0, float addrspace(1)* %out
19  ret void
20}
21
22define void @fnearbyint_v2f32(<2 x float> addrspace(1)* %out, <2 x float> %in) #1 {
23entry:
24  %0 = call <2 x float> @llvm.nearbyint.v2f32(<2 x float> %in)
25  store <2 x float> %0, <2 x float> addrspace(1)* %out
26  ret void
27}
28
29define void @fnearbyint_v4f32(<4 x float> addrspace(1)* %out, <4 x float> %in) #1 {
30entry:
31  %0 = call <4 x float> @llvm.nearbyint.v4f32(<4 x float> %in)
32  store <4 x float> %0, <4 x float> addrspace(1)* %out
33  ret void
34}
35
36define void @nearbyint_f64(double addrspace(1)* %out, double %in) {
37entry:
38  %0 = call double @llvm.nearbyint.f64(double %in)
39  store double %0, double addrspace(1)* %out
40  ret void
41}
42define void @nearbyint_v2f64(<2 x double> addrspace(1)* %out, <2 x double> %in) {
43entry:
44  %0 = call <2 x double> @llvm.nearbyint.v2f64(<2 x double> %in)
45  store <2 x double> %0, <2 x double> addrspace(1)* %out
46  ret void
47}
48
49define void @nearbyint_v4f64(<4 x double> addrspace(1)* %out, <4 x double> %in) {
50entry:
51  %0 = call <4 x double> @llvm.nearbyint.v4f64(<4 x double> %in)
52  store <4 x double> %0, <4 x double> addrspace(1)* %out
53  ret void
54}
55
56attributes #0 = { nounwind readonly }
57attributes #1 = { nounwind }
58