1; Test loads of FP constants with VGM and VGBM.
2;
3; RUN: llc < %s -mtriple=s390x-linux-gnu -mcpu=z13 | FileCheck %s
4
5define double @f1() {
6; CHECK-LABEL: f1:
7; CHECK: vgmg %v0, 2, 11
8  ret double 1.0
9}
10
11define double @f2() {
12; CHECK-LABEL: f2:
13; CHECK: vgmg %v0, 1, 1
14  ret double 2.0
15}
16
17define double @f3() {
18; CHECK-LABEL: f3:
19; CHECK: vgmg %v0, 0, 1
20  ret double -2.0
21}
22
23define double @f4() {
24; CHECK-LABEL: f4:
25; CHECK: vgmg %v0, 2, 10
26  ret double 0.5
27}
28
29define double @f5() {
30; CHECK-LABEL: f5:
31; CHECK: vgmg %v0, 2, 9
32  ret double 0.125
33}
34
35define float @f6() {
36; CHECK-LABEL: f6:
37; CHECK: vgmf %v0, 2, 8
38  ret float 1.0
39}
40
41define float @f7() {
42; CHECK-LABEL: f7:
43; CHECK: vgmf %v0, 1, 1
44  ret float 2.0
45}
46
47define float @f8() {
48; CHECK-LABEL: f8:
49; CHECK: vgmf %v0, 0, 1
50  ret float -2.0
51}
52
53define float @f9() {
54; CHECK-LABEL: f9:
55; CHECK: vgmf %v0, 2, 7
56  ret float 0.5
57}
58
59define float @f10() {
60; CHECK-LABEL: f10:
61; CHECK: vgmf %v0, 2, 6
62  ret float 0.125
63}
64
65define float @f11() {
66; CHECK-LABEL: f11:
67; CHECK: vgbm %v0, 61440
68  ret float 0xFFFFFFFFE0000000
69}
70
71define double @f12() {
72; CHECK-LABEL: f12:
73; CHECK: vgbm %v0, 61440
74  ret double 0xFFFFFFFF00000000
75}
76