annotate llvm/test/CodeGen/AMDGPU/fnearbyint.ll @ 206:f17a3b42b08b

Added tag before-12 for changeset b7591485f4cd
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Mon, 07 Jun 2021 21:25:57 +0900
parents 1d019706d866
children c4bab56944e8
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
150
anatofuz
parents:
diff changeset
1 ; RUN: llc -march=amdgcn -verify-machineinstrs < %s
anatofuz
parents:
diff changeset
2 ; RUN: llc -march=amdgcn -mcpu=bonaire -verify-machineinstrs < %s
anatofuz
parents:
diff changeset
3 ; RUN: llc -march=amdgcn -mcpu=tonga -mattr=-flat-for-global -verify-machineinstrs < %s
anatofuz
parents:
diff changeset
4
anatofuz
parents:
diff changeset
5 ; This should have the exactly the same output as the test for rint,
anatofuz
parents:
diff changeset
6 ; so no need to check anything.
anatofuz
parents:
diff changeset
7
anatofuz
parents:
diff changeset
8 declare float @llvm.nearbyint.f32(float) #0
anatofuz
parents:
diff changeset
9 declare <2 x float> @llvm.nearbyint.v2f32(<2 x float>) #0
anatofuz
parents:
diff changeset
10 declare <4 x float> @llvm.nearbyint.v4f32(<4 x float>) #0
anatofuz
parents:
diff changeset
11 declare double @llvm.nearbyint.f64(double) #0
anatofuz
parents:
diff changeset
12 declare <2 x double> @llvm.nearbyint.v2f64(<2 x double>) #0
anatofuz
parents:
diff changeset
13 declare <4 x double> @llvm.nearbyint.v4f64(<4 x double>) #0
anatofuz
parents:
diff changeset
14
anatofuz
parents:
diff changeset
15
anatofuz
parents:
diff changeset
16 define amdgpu_kernel void @fnearbyint_f32(float addrspace(1)* %out, float %in) #1 {
anatofuz
parents:
diff changeset
17 entry:
anatofuz
parents:
diff changeset
18 %0 = call float @llvm.nearbyint.f32(float %in)
anatofuz
parents:
diff changeset
19 store float %0, float addrspace(1)* %out
anatofuz
parents:
diff changeset
20 ret void
anatofuz
parents:
diff changeset
21 }
anatofuz
parents:
diff changeset
22
anatofuz
parents:
diff changeset
23 define amdgpu_kernel void @fnearbyint_v2f32(<2 x float> addrspace(1)* %out, <2 x float> %in) #1 {
anatofuz
parents:
diff changeset
24 entry:
anatofuz
parents:
diff changeset
25 %0 = call <2 x float> @llvm.nearbyint.v2f32(<2 x float> %in)
anatofuz
parents:
diff changeset
26 store <2 x float> %0, <2 x float> addrspace(1)* %out
anatofuz
parents:
diff changeset
27 ret void
anatofuz
parents:
diff changeset
28 }
anatofuz
parents:
diff changeset
29
anatofuz
parents:
diff changeset
30 define amdgpu_kernel void @fnearbyint_v4f32(<4 x float> addrspace(1)* %out, <4 x float> %in) #1 {
anatofuz
parents:
diff changeset
31 entry:
anatofuz
parents:
diff changeset
32 %0 = call <4 x float> @llvm.nearbyint.v4f32(<4 x float> %in)
anatofuz
parents:
diff changeset
33 store <4 x float> %0, <4 x float> addrspace(1)* %out
anatofuz
parents:
diff changeset
34 ret void
anatofuz
parents:
diff changeset
35 }
anatofuz
parents:
diff changeset
36
anatofuz
parents:
diff changeset
37 define amdgpu_kernel void @nearbyint_f64(double addrspace(1)* %out, double %in) {
anatofuz
parents:
diff changeset
38 entry:
anatofuz
parents:
diff changeset
39 %0 = call double @llvm.nearbyint.f64(double %in)
anatofuz
parents:
diff changeset
40 store double %0, double addrspace(1)* %out
anatofuz
parents:
diff changeset
41 ret void
anatofuz
parents:
diff changeset
42 }
anatofuz
parents:
diff changeset
43 define amdgpu_kernel void @nearbyint_v2f64(<2 x double> addrspace(1)* %out, <2 x double> %in) {
anatofuz
parents:
diff changeset
44 entry:
anatofuz
parents:
diff changeset
45 %0 = call <2 x double> @llvm.nearbyint.v2f64(<2 x double> %in)
anatofuz
parents:
diff changeset
46 store <2 x double> %0, <2 x double> addrspace(1)* %out
anatofuz
parents:
diff changeset
47 ret void
anatofuz
parents:
diff changeset
48 }
anatofuz
parents:
diff changeset
49
anatofuz
parents:
diff changeset
50 define amdgpu_kernel void @nearbyint_v4f64(<4 x double> addrspace(1)* %out, <4 x double> %in) {
anatofuz
parents:
diff changeset
51 entry:
anatofuz
parents:
diff changeset
52 %0 = call <4 x double> @llvm.nearbyint.v4f64(<4 x double> %in)
anatofuz
parents:
diff changeset
53 store <4 x double> %0, <4 x double> addrspace(1)* %out
anatofuz
parents:
diff changeset
54 ret void
anatofuz
parents:
diff changeset
55 }
anatofuz
parents:
diff changeset
56
anatofuz
parents:
diff changeset
57 attributes #0 = { nounwind readonly }
anatofuz
parents:
diff changeset
58 attributes #1 = { nounwind }