annotate test/CodeGen/SystemZ/fp-conv-15.ll @ 128:c347d3398279 default tip

fix
author mir3636
date Wed, 06 Dec 2017 14:37:17 +0900
parents 803732b1fca8
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
121
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1 ; Test f128 floating-point truncations/extensions on z14.
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
2 ;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
3 ; RUN: llc < %s -mtriple=s390x-linux-gnu -mcpu=z14 | FileCheck %s
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
4
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
5 ; Test f128->f64.
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
6 define double @f1(fp128 *%ptr) {
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
7 ; CHECK-LABEL: f1:
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
8 ; CHECK: vl [[REG:%v[0-9]+]], 0(%r2)
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
9 ; CHECK: wflrx %f0, [[REG]], 0, 0
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
10 ; CHECK: br %r14
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
11 %val = load fp128, fp128 *%ptr
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
12 %res = fptrunc fp128 %val to double
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
13 ret double %res
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
14 }
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
15
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
16 ; Test f128->f32.
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
17 define float @f2(fp128 *%ptr) {
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
18 ; CHECK-LABEL: f2:
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
19 ; CHECK: vl [[REG:%v[0-9]+]], 0(%r2)
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
20 ; CHECK: wflrx %f0, [[REG]], 0, 3
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
21 ; CHECK: ledbra %f0, 0, %f0, 0
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
22 ; CHECK: br %r14
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
23 %val = load fp128, fp128 *%ptr
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
24 %res = fptrunc fp128 %val to float
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
25 ret float %res
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
26 }
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
27
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
28 ; Test f64->f128.
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
29 define void @f3(fp128 *%dst, double %val) {
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
30 ; CHECK-LABEL: f3:
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
31 ; CHECK: wflld [[RES:%v[0-9]+]], %f0
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
32 ; CHECK: vst [[RES]], 0(%r2)
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
33 ; CHECK: br %r14
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
34 %res = fpext double %val to fp128
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
35 store fp128 %res, fp128 *%dst
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
36 ret void
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
37 }
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
38
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
39 ; Test f32->f128.
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
40 define void @f4(fp128 *%dst, float %val) {
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
41 ; CHECK-LABEL: f4:
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
42 ; CHECK: ldebr %f0, %f0
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
43 ; CHECK: wflld [[RES:%v[0-9]+]], %f0
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
44 ; CHECK: vst [[RES]], 0(%r2)
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
45 ; CHECK: br %r14
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
46 %res = fpext float %val to fp128
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
47 store fp128 %res, fp128 *%dst
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
48 ret void
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
49 }
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
50