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)
8 declare double @llvm.experimental.constrained.ceil.f64(double, metadata)
9 declare double @llvm.experimental.constrained.trunc.f64(double, metadata)
10 declare double @llvm.experimental.constrained.round.f64(double, 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)
14 declare <2 x double> @llvm.experimental.constrained.ceil.v2f64(<2 x double>, metadata)
15 declare <2 x double> @llvm.experimental.constrained.trunc.v2f64(<2 x double>, metadata)
16 declare <2 x double> @llvm.experimental.constrained.round.v2f64(<2 x double>, 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 !"fpexcept.strict") #0
50 define <2 x double> @f4(<2 x double> %val) #0 {
52 ; CHECK: vfidb %v24, %v24, 4, 6
54 %res = call <2 x double> @llvm.experimental.constrained.ceil.v2f64(
56 metadata !"fpexcept.strict") #0
60 define <2 x double> @f5(<2 x double> %val) #0 {
62 ; CHECK: vfidb %v24, %v24, 4, 5
64 %res = call <2 x double> @llvm.experimental.constrained.trunc.v2f64(
66 metadata !"fpexcept.strict") #0
70 define <2 x double> @f6(<2 x double> %val) #0 {
72 ; CHECK: vfidb %v24, %v24, 4, 1
74 %res = call <2 x double> @llvm.experimental.constrained.round.v2f64(
76 metadata !"fpexcept.strict") #0
80 define double @f7(<2 x double> %val) #0 {
82 ; CHECK: wfidb %f0, %v24, 0, 0
84 %scalar = extractelement <2 x double> %val, i32 0
85 %res = call double @llvm.experimental.constrained.rint.f64(
87 metadata !"round.dynamic",
88 metadata !"fpexcept.strict") #0
92 define double @f8(<2 x double> %val) #0 {
94 ; CHECK: wfidb %f0, %v24, 4, 0
96 %scalar = extractelement <2 x double> %val, i32 0
97 %res = call double @llvm.experimental.constrained.nearbyint.f64(
99 metadata !"round.dynamic",
100 metadata !"fpexcept.strict") #0
104 define double @f9(<2 x double> %val) #0 {
106 ; CHECK: wfidb %f0, %v24, 4, 7
108 %scalar = extractelement <2 x double> %val, i32 0
109 %res = call double @llvm.experimental.constrained.floor.f64(
111 metadata !"fpexcept.strict") #0
116 define double @f10(<2 x double> %val) #0 {
118 ; CHECK: wfidb %f0, %v24, 4, 6
120 %scalar = extractelement <2 x double> %val, i32 0
121 %res = call double @llvm.experimental.constrained.ceil.f64(
123 metadata !"fpexcept.strict") #0
127 define double @f11(<2 x double> %val) #0 {
129 ; CHECK: wfidb %f0, %v24, 4, 5
131 %scalar = extractelement <2 x double> %val, i32 0
132 %res = call double @llvm.experimental.constrained.trunc.f64(
134 metadata !"fpexcept.strict") #0
138 define double @f12(<2 x double> %val) #0 {
140 ; CHECK: wfidb %f0, %v24, 4, 1
142 %scalar = extractelement <2 x double> %val, i32 0
143 %res = call double @llvm.experimental.constrained.round.f64(
145 metadata !"fpexcept.strict") #0
149 attributes #0 = { strictfp }