1 ; Test f128 floating-point truncations/extensions on z14.
3 ; RUN: llc < %s -mtriple=s390x-linux-gnu -mcpu=z14 | FileCheck %s
6 define double @f1(ptr %ptr) {
8 ; CHECK: vl [[REG:%v[0-9]+]], 0(%r2)
9 ; CHECK: wflrx %f0, [[REG]], 0, 0
11 %val = load fp128, ptr %ptr
12 %res = fptrunc fp128 %val to double
17 define float @f2(ptr %ptr) {
19 ; CHECK: vl [[REG:%v[0-9]+]], 0(%r2)
20 ; CHECK: wflrx %f0, [[REG]], 0, 3
21 ; CHECK: ledbra %f0, 0, %f0, 0
23 %val = load fp128, ptr %ptr
24 %res = fptrunc fp128 %val to float
29 define void @f3(ptr %dst, double %val) {
31 ; CHECK: wflld [[RES:%v[0-9]+]], %f0
32 ; CHECK: vst [[RES]], 0(%r2)
34 %res = fpext double %val to fp128
35 store fp128 %res, ptr %dst
40 define void @f4(ptr %dst, float %val) {
42 ; CHECK: ldebr %f0, %f0
43 ; CHECK: wflld [[RES:%v[0-9]+]], %f0
44 ; CHECK: vst [[RES]], 0(%r2)
46 %res = fpext float %val to fp128
47 store fp128 %res, ptr %dst