1 ; Test loads of f128 floating-point constants on z14.
3 ; RUN: llc < %s -mtriple=s390x-linux-gnu -mcpu=z14 | FileCheck %s
4 ; RUN: llc < %s -mtriple=s390x-linux-gnu -mcpu=z14 | FileCheck %s -check-prefix=CONST
7 define void @f1(ptr %x) {
9 ; CHECK: vzero [[REG:%v[0-9]+]]
10 ; CHECK: vst [[REG]], 0(%r2)
12 store fp128 0xL00000000000000000000000000000000, ptr %x
16 ; Test loading of negative floating-point zero.
17 define void @f2(ptr %x) {
19 ; CHECK: vzero [[REG:%v[0-9]+]]
20 ; CHECK: wflnxb [[REG]], [[REG]]
21 ; CHECK: vst [[REG]], 0(%r2)
23 store fp128 0xL00000000000000008000000000000000, ptr %x
27 ; Test loading of a 128-bit floating-point constant. This value would
28 ; actually fit within the 32-bit format, but we don't have extending
29 ; loads into vector registers.
30 define void @f3(ptr %x) {
32 ; CHECK: larl [[REGISTER:%r[1-5]+]], {{.*}}
33 ; CHECK: vl [[REG:%v[0-9]+]], 0([[REGISTER]])
34 ; CHECK: vst [[REG]], 0(%r2)
36 ; CONST: .quad 0x3fff000002000000
38 store fp128 0xL00000000000000003fff000002000000, ptr %x
42 ; Test that VGBM works.
43 define void @f4(ptr %x) {
45 ; CHECK: vgbm %v0, 21845
46 ; CHECK-NEXT: vst %v0, 0(%r2)
48 store fp128 0xL00ff00ff00ff00ff00ff00ff00ff00ff, ptr %x
52 ; Test that VREPI works.
53 define void @f5(ptr %x) {
55 ; CHECK: vrepib %v0, -8
56 ; CHECK-NEXT: vst %v0, 0(%r2)
58 store fp128 0xLf8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8, ptr %x
62 ; Test that VGM works.
63 define void @f6(ptr %x) {
65 ; CHECK: vgmg %v0, 12, 31
66 ; CHECK-NEXT: vst %v0, 0(%r2)
68 store fp128 0xL000fffff00000000000fffff00000000, ptr %x