1 ; Test strict v4f32 rounding on z14.
3 ; RUN: llc < %s -mtriple=s390x-linux-gnu -mcpu=z14 | FileCheck %s
5 declare float @llvm.experimental.constrained.rint.f32(float, metadata, metadata)
6 declare float @llvm.experimental.constrained.nearbyint.f32(float, metadata, metadata)
7 declare float @llvm.experimental.constrained.floor.f32(float, metadata)
8 declare float @llvm.experimental.constrained.ceil.f32(float, metadata)
9 declare float @llvm.experimental.constrained.trunc.f32(float, metadata)
10 declare float @llvm.experimental.constrained.round.f32(float, metadata)
11 declare <4 x float> @llvm.experimental.constrained.rint.v4f32(<4 x float>, metadata, metadata)
12 declare <4 x float> @llvm.experimental.constrained.nearbyint.v4f32(<4 x float>, metadata, metadata)
13 declare <4 x float> @llvm.experimental.constrained.floor.v4f32(<4 x float>, metadata)
14 declare <4 x float> @llvm.experimental.constrained.ceil.v4f32(<4 x float>, metadata)
15 declare <4 x float> @llvm.experimental.constrained.trunc.v4f32(<4 x float>, metadata)
16 declare <4 x float> @llvm.experimental.constrained.round.v4f32(<4 x float>, metadata)
18 define <4 x float> @f1(<4 x float> %val) #0 {
20 ; CHECK: vfisb %v24, %v24, 0, 0
22 %res = call <4 x float> @llvm.experimental.constrained.rint.v4f32(
24 metadata !"round.dynamic",
25 metadata !"fpexcept.strict") #0
29 define <4 x float> @f2(<4 x float> %val) #0 {
31 ; CHECK: vfisb %v24, %v24, 4, 0
33 %res = call <4 x float> @llvm.experimental.constrained.nearbyint.v4f32(
35 metadata !"round.dynamic",
36 metadata !"fpexcept.strict") #0
40 define <4 x float> @f3(<4 x float> %val) #0 {
42 ; CHECK: vfisb %v24, %v24, 4, 7
44 %res = call <4 x float> @llvm.experimental.constrained.floor.v4f32(
46 metadata !"fpexcept.strict") #0
50 define <4 x float> @f4(<4 x float> %val) #0 {
52 ; CHECK: vfisb %v24, %v24, 4, 6
54 %res = call <4 x float> @llvm.experimental.constrained.ceil.v4f32(
56 metadata !"fpexcept.strict") #0
60 define <4 x float> @f5(<4 x float> %val) #0 {
62 ; CHECK: vfisb %v24, %v24, 4, 5
64 %res = call <4 x float> @llvm.experimental.constrained.trunc.v4f32(
66 metadata !"fpexcept.strict") #0
70 define <4 x float> @f6(<4 x float> %val) #0 {
72 ; CHECK: vfisb %v24, %v24, 4, 1
74 %res = call <4 x float> @llvm.experimental.constrained.round.v4f32(
76 metadata !"fpexcept.strict") #0
80 define float @f7(<4 x float> %val) #0 {
82 ; CHECK: wfisb %f0, %v24, 0, 0
84 %scalar = extractelement <4 x float> %val, i32 0
85 %res = call float @llvm.experimental.constrained.rint.f32(
87 metadata !"round.dynamic",
88 metadata !"fpexcept.strict") #0
92 define float @f8(<4 x float> %val) #0 {
94 ; CHECK: wfisb %f0, %v24, 4, 0
96 %scalar = extractelement <4 x float> %val, i32 0
97 %res = call float @llvm.experimental.constrained.nearbyint.f32(
99 metadata !"round.dynamic",
100 metadata !"fpexcept.strict") #0
104 define float @f9(<4 x float> %val) #0 {
106 ; CHECK: wfisb %f0, %v24, 4, 7
108 %scalar = extractelement <4 x float> %val, i32 0
109 %res = call float @llvm.experimental.constrained.floor.f32(
111 metadata !"fpexcept.strict") #0
115 define float @f10(<4 x float> %val) #0 {
117 ; CHECK: wfisb %f0, %v24, 4, 6
119 %scalar = extractelement <4 x float> %val, i32 0
120 %res = call float @llvm.experimental.constrained.ceil.f32(
122 metadata !"fpexcept.strict") #0
126 define float @f11(<4 x float> %val) #0 {
128 ; CHECK: wfisb %f0, %v24, 4, 5
130 %scalar = extractelement <4 x float> %val, i32 0
131 %res = call float @llvm.experimental.constrained.trunc.f32(
133 metadata !"fpexcept.strict") #0
137 define float @f12(<4 x float> %val) #0 {
139 ; CHECK: wfisb %f0, %v24, 4, 1
141 %scalar = extractelement <4 x float> %val, i32 0
142 %res = call float @llvm.experimental.constrained.round.f32(
144 metadata !"fpexcept.strict") #0
148 attributes #0 = { strictfp }