1 ; Test strict v2f64 rounding.
3 ; RUN: llc < %s -mtriple=s390x-linux-gnu -mcpu=z13 | FileCheck %s
5 declare double @llvm.experimental.constrained.rint.f64(double, metadata, metadata)
6 declare double @llvm.experimental.constrained.nearbyint.f64(double, metadata, metadata)
7 declare double @llvm.experimental.constrained.floor.f64(double, metadata, metadata)
8 declare double @llvm.experimental.constrained.ceil.f64(double, metadata, metadata)
9 declare double @llvm.experimental.constrained.trunc.f64(double, metadata, metadata)
10 declare double @llvm.experimental.constrained.round.f64(double, metadata, metadata)
11 declare <2 x double> @llvm.experimental.constrained.rint.v2f64(<2 x double>, metadata, metadata)
12 declare <2 x double> @llvm.experimental.constrained.nearbyint.v2f64(<2 x double>, metadata, metadata)
13 declare <2 x double> @llvm.experimental.constrained.floor.v2f64(<2 x double>, metadata, metadata)
14 declare <2 x double> @llvm.experimental.constrained.ceil.v2f64(<2 x double>, metadata, metadata)
15 declare <2 x double> @llvm.experimental.constrained.trunc.v2f64(<2 x double>, metadata, metadata)
16 declare <2 x double> @llvm.experimental.constrained.round.v2f64(<2 x double>, metadata, metadata)
18 define <2 x double> @f1(<2 x double> %val) #0 {
20 ; CHECK: vfidb %v24, %v24, 0, 0
22 %res = call <2 x double> @llvm.experimental.constrained.rint.v2f64(
24 metadata !"round.dynamic",
25 metadata !"fpexcept.strict") #0
29 define <2 x double> @f2(<2 x double> %val) #0 {
31 ; CHECK: vfidb %v24, %v24, 4, 0
33 %res = call <2 x double> @llvm.experimental.constrained.nearbyint.v2f64(
35 metadata !"round.dynamic",
36 metadata !"fpexcept.strict") #0
40 define <2 x double> @f3(<2 x double> %val) #0 {
42 ; CHECK: vfidb %v24, %v24, 4, 7
44 %res = call <2 x double> @llvm.experimental.constrained.floor.v2f64(
46 metadata !"round.dynamic",
47 metadata !"fpexcept.strict") #0
51 define <2 x double> @f4(<2 x double> %val) #0 {
53 ; CHECK: vfidb %v24, %v24, 4, 6
55 %res = call <2 x double> @llvm.experimental.constrained.ceil.v2f64(
57 metadata !"round.dynamic",
58 metadata !"fpexcept.strict") #0
62 define <2 x double> @f5(<2 x double> %val) #0 {
64 ; CHECK: vfidb %v24, %v24, 4, 5
66 %res = call <2 x double> @llvm.experimental.constrained.trunc.v2f64(
68 metadata !"round.dynamic",
69 metadata !"fpexcept.strict") #0
73 define <2 x double> @f6(<2 x double> %val) #0 {
75 ; CHECK: vfidb %v24, %v24, 4, 1
77 %res = call <2 x double> @llvm.experimental.constrained.round.v2f64(
79 metadata !"round.dynamic",
80 metadata !"fpexcept.strict") #0
84 define double @f7(<2 x double> %val) #0 {
86 ; CHECK: wfidb %f0, %v24, 0, 0
88 %scalar = extractelement <2 x double> %val, i32 0
89 %res = call double @llvm.experimental.constrained.rint.f64(
91 metadata !"round.dynamic",
92 metadata !"fpexcept.strict") #0
96 define double @f8(<2 x double> %val) #0 {
98 ; CHECK: wfidb %f0, %v24, 4, 0
100 %scalar = extractelement <2 x double> %val, i32 0
101 %res = call double @llvm.experimental.constrained.nearbyint.f64(
103 metadata !"round.dynamic",
104 metadata !"fpexcept.strict") #0
108 define double @f9(<2 x double> %val) #0 {
110 ; CHECK: wfidb %f0, %v24, 4, 7
112 %scalar = extractelement <2 x double> %val, i32 0
113 %res = call double @llvm.experimental.constrained.floor.f64(
115 metadata !"round.dynamic",
116 metadata !"fpexcept.strict") #0
121 define double @f10(<2 x double> %val) #0 {
123 ; CHECK: wfidb %f0, %v24, 4, 6
125 %scalar = extractelement <2 x double> %val, i32 0
126 %res = call double @llvm.experimental.constrained.ceil.f64(
128 metadata !"round.dynamic",
129 metadata !"fpexcept.strict") #0
133 define double @f11(<2 x double> %val) #0 {
135 ; CHECK: wfidb %f0, %v24, 4, 5
137 %scalar = extractelement <2 x double> %val, i32 0
138 %res = call double @llvm.experimental.constrained.trunc.f64(
140 metadata !"round.dynamic",
141 metadata !"fpexcept.strict") #0
145 define double @f12(<2 x double> %val) #0 {
147 ; CHECK: wfidb %f0, %v24, 4, 1
149 %scalar = extractelement <2 x double> %val, i32 0
150 %res = call double @llvm.experimental.constrained.round.f64(
152 metadata !"round.dynamic",
153 metadata !"fpexcept.strict") #0
157 attributes #0 = { strictfp }