fp-strict-f128.ll
4.52 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
; RUN: llc -verify-machineinstrs -ppc-asm-full-reg-names -ppc-vsr-nums-as-vr \
; RUN: < %s -mtriple=powerpc64le-unknown-linux -mcpu=pwr9 | FileCheck %s
declare fp128 @llvm.experimental.constrained.fadd.f128(fp128, fp128, metadata, metadata)
declare fp128 @llvm.experimental.constrained.fsub.f128(fp128, fp128, metadata, metadata)
declare fp128 @llvm.experimental.constrained.fmul.f128(fp128, fp128, metadata, metadata)
declare fp128 @llvm.experimental.constrained.fdiv.f128(fp128, fp128, metadata, metadata)
declare fp128 @llvm.experimental.constrained.fma.f128(fp128, fp128, fp128, metadata, metadata)
declare fp128 @llvm.experimental.constrained.sqrt.f128(fp128, metadata, metadata)
define fp128 @fadd_f128(fp128 %f1, fp128 %f2) #0 {
; CHECK-LABEL: fadd_f128:
; CHECK: # %bb.0:
; CHECK-NEXT: xsaddqp v2, v2, v3
; CHECK-NEXT: blr
%res = call fp128 @llvm.experimental.constrained.fadd.f128(
fp128 %f1, fp128 %f2,
metadata !"round.dynamic",
metadata !"fpexcept.strict") #0
ret fp128 %res
}
define fp128 @fsub_f128(fp128 %f1, fp128 %f2) #0 {
; CHECK-LABEL: fsub_f128:
; CHECK: # %bb.0:
; CHECK-NEXT: xssubqp v2, v2, v3
; CHECK-NEXT: blr
%res = call fp128 @llvm.experimental.constrained.fsub.f128(
fp128 %f1, fp128 %f2,
metadata !"round.dynamic",
metadata !"fpexcept.strict") #0
ret fp128 %res
}
define fp128 @fmul_f128(fp128 %f1, fp128 %f2) #0 {
; CHECK-LABEL: fmul_f128:
; CHECK: # %bb.0:
; CHECK-NEXT: xsmulqp v2, v2, v3
; CHECK-NEXT: blr
%res = call fp128 @llvm.experimental.constrained.fmul.f128(
fp128 %f1, fp128 %f2,
metadata !"round.dynamic",
metadata !"fpexcept.strict") #0
ret fp128 %res
}
define fp128 @fdiv_f128(fp128 %f1, fp128 %f2) #0 {
; CHECK-LABEL: fdiv_f128:
; CHECK: # %bb.0:
; CHECK-NEXT: xsdivqp v2, v2, v3
; CHECK-NEXT: blr
%res = call fp128 @llvm.experimental.constrained.fdiv.f128(
fp128 %f1, fp128 %f2,
metadata !"round.dynamic",
metadata !"fpexcept.strict") #0
ret fp128 %res
}
define fp128 @fmadd_f128(fp128 %f0, fp128 %f1, fp128 %f2) #0 {
; CHECK-LABEL: fmadd_f128:
; CHECK: # %bb.0:
; CHECK-NEXT: xsmaddqp v4, v2, v3
; CHECK-NEXT: vmr v2, v4
; CHECK-NEXT: blr
%res = call fp128 @llvm.experimental.constrained.fma.f128(
fp128 %f0, fp128 %f1, fp128 %f2,
metadata !"round.dynamic",
metadata !"fpexcept.strict") #0
ret fp128 %res
}
define fp128 @fmsub_f128(fp128 %f0, fp128 %f1, fp128 %f2) #0 {
; CHECK-LABEL: fmsub_f128:
; CHECK: # %bb.0:
; CHECK-NEXT: xsmsubqp v4, v2, v3
; CHECK-NEXT: vmr v2, v4
; CHECK-NEXT: blr
%neg = fneg fp128 %f2
%res = call fp128 @llvm.experimental.constrained.fma.f128(
fp128 %f0, fp128 %f1, fp128 %neg,
metadata !"round.dynamic",
metadata !"fpexcept.strict") #0
ret fp128 %res
}
define fp128 @fnmadd_f128(fp128 %f0, fp128 %f1, fp128 %f2) #0 {
; CHECK-LABEL: fnmadd_f128:
; CHECK: # %bb.0:
; CHECK-NEXT: xsnmaddqp v4, v2, v3
; CHECK-NEXT: vmr v2, v4
; CHECK-NEXT: blr
%fma = call fp128 @llvm.experimental.constrained.fma.f128(
fp128 %f0, fp128 %f1, fp128 %f2,
metadata !"round.dynamic",
metadata !"fpexcept.strict") #0
%res = fneg fp128 %fma
ret fp128 %res
}
define fp128 @fnmsub_f128(fp128 %f0, fp128 %f1, fp128 %f2) #0 {
; CHECK-LABEL: fnmsub_f128:
; CHECK: # %bb.0:
; CHECK-NEXT: xsnmsubqp v4, v2, v3
; CHECK-NEXT: vmr v2, v4
; CHECK-NEXT: blr
%neg = fneg fp128 %f2
%fma = call fp128 @llvm.experimental.constrained.fma.f128(
fp128 %f0, fp128 %f1, fp128 %neg,
metadata !"round.dynamic",
metadata !"fpexcept.strict") #0
%res = fneg fp128 %fma
ret fp128 %res
}
define fp128 @fsqrt_f128(fp128 %f1) #0 {
; CHECK-LABEL: fsqrt_f128:
; CHECK: # %bb.0:
; CHECK-NEXT: xssqrtqp v2, v2
; CHECK-NEXT: blr
%res = call fp128 @llvm.experimental.constrained.sqrt.f128(
fp128 %f1,
metadata !"round.dynamic",
metadata !"fpexcept.strict") #0
ret fp128 %res
}
attributes #0 = { strictfp }