1 ; Test strict 128-bit floating-point multiplication on z14.
3 ; RUN: llc < %s -mtriple=s390x-linux-gnu -mcpu=z14 | FileCheck %s
5 declare fp128 @llvm.experimental.constrained.fmul.f128(fp128, fp128, metadata, metadata)
6 declare fp128 @llvm.experimental.constrained.fpext.f128.f64(double, metadata)
8 define void @f1(ptr %ptr1, ptr %ptr2) #0 {
10 ; CHECK-DAG: vl [[REG1:%v[0-9]+]], 0(%r2)
11 ; CHECK-DAG: vl [[REG2:%v[0-9]+]], 0(%r3)
12 ; CHECK: wfmxb [[RES:%v[0-9]+]], [[REG1]], [[REG2]]
13 ; CHECK: vst [[RES]], 0(%r2)
15 %f1 = load fp128, ptr %ptr1
16 %f2 = load fp128, ptr %ptr2
17 %sum = call fp128 @llvm.experimental.constrained.fmul.f128(
19 metadata !"round.dynamic",
20 metadata !"fpexcept.strict") #0
21 store fp128 %sum, ptr %ptr1
25 define void @f2(double %f1, double %f2, ptr %dst) #0 {
27 ; CHECK-DAG: wflld [[REG1:%v[0-9]+]], %f0
28 ; CHECK-DAG: wflld [[REG2:%v[0-9]+]], %f2
29 ; CHECK: wfmxb [[RES:%v[0-9]+]], [[REG1]], [[REG2]]
30 ; CHECK: vst [[RES]], 0(%r2)
32 %f1x = call fp128 @llvm.experimental.constrained.fpext.f128.f64(double %f1,
33 metadata !"fpexcept.strict") #0
34 %f2x = call fp128 @llvm.experimental.constrained.fpext.f128.f64(double %f2,
35 metadata !"fpexcept.strict") #0
36 %res = call fp128 @llvm.experimental.constrained.fmul.f128(
37 fp128 %f1x, fp128 %f2x,
38 metadata !"round.dynamic",
39 metadata !"fpexcept.strict") #0
40 store fp128 %res, ptr %dst
44 attributes #0 = { strictfp }