3 ; RUN: llc < %s -mtriple=s390x-linux-gnu -mcpu=z13 | FileCheck %s
5 declare double @llvm.rint.f64(double)
6 declare double @llvm.nearbyint.f64(double)
7 declare double @llvm.floor.f64(double)
8 declare double @llvm.ceil.f64(double)
9 declare double @llvm.trunc.f64(double)
10 declare double @llvm.round.f64(double)
11 declare <2 x double> @llvm.rint.v2f64(<2 x double>)
12 declare <2 x double> @llvm.nearbyint.v2f64(<2 x double>)
13 declare <2 x double> @llvm.floor.v2f64(<2 x double>)
14 declare <2 x double> @llvm.ceil.v2f64(<2 x double>)
15 declare <2 x double> @llvm.trunc.v2f64(<2 x double>)
16 declare <2 x double> @llvm.round.v2f64(<2 x double>)
18 define <2 x double> @f1(<2 x double> %val) {
20 ; CHECK: vfidb %v24, %v24, 0, 0
22 %res = call <2 x double> @llvm.rint.v2f64(<2 x double> %val)
26 define <2 x double> @f2(<2 x double> %val) {
28 ; CHECK: vfidb %v24, %v24, 4, 0
30 %res = call <2 x double> @llvm.nearbyint.v2f64(<2 x double> %val)
34 define <2 x double> @f3(<2 x double> %val) {
36 ; CHECK: vfidb %v24, %v24, 4, 7
38 %res = call <2 x double> @llvm.floor.v2f64(<2 x double> %val)
42 define <2 x double> @f4(<2 x double> %val) {
44 ; CHECK: vfidb %v24, %v24, 4, 6
46 %res = call <2 x double> @llvm.ceil.v2f64(<2 x double> %val)
50 define <2 x double> @f5(<2 x double> %val) {
52 ; CHECK: vfidb %v24, %v24, 4, 5
54 %res = call <2 x double> @llvm.trunc.v2f64(<2 x double> %val)
58 define <2 x double> @f6(<2 x double> %val) {
60 ; CHECK: vfidb %v24, %v24, 4, 1
62 %res = call <2 x double> @llvm.round.v2f64(<2 x double> %val)
66 define double @f7(<2 x double> %val) {
68 ; CHECK: wfidb %f0, %v24, 0, 0
70 %scalar = extractelement <2 x double> %val, i32 0
71 %res = call double @llvm.rint.f64(double %scalar)
75 define double @f8(<2 x double> %val) {
77 ; CHECK: wfidb %f0, %v24, 4, 0
79 %scalar = extractelement <2 x double> %val, i32 0
80 %res = call double @llvm.nearbyint.f64(double %scalar)
84 define double @f9(<2 x double> %val) {
86 ; CHECK: wfidb %f0, %v24, 4, 7
88 %scalar = extractelement <2 x double> %val, i32 0
89 %res = call double @llvm.floor.f64(double %scalar)
93 define double @f10(<2 x double> %val) {
95 ; CHECK: wfidb %f0, %v24, 4, 6
97 %scalar = extractelement <2 x double> %val, i32 0
98 %res = call double @llvm.ceil.f64(double %scalar)
102 define double @f11(<2 x double> %val) {
104 ; CHECK: wfidb %f0, %v24, 4, 5
106 %scalar = extractelement <2 x double> %val, i32 0
107 %res = call double @llvm.trunc.f64(double %scalar)
111 define double @f12(<2 x double> %val) {
113 ; CHECK: wfidb %f0, %v24, 4, 1
115 %scalar = extractelement <2 x double> %val, i32 0
116 %res = call double @llvm.round.f64(double %scalar)