1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -verify-machineinstrs -mtriple=powerpc64le-unknown-linux-gnu < %s |\
3 ; RUN: FileCheck %s --check-prefix=CHECK-PWR8
4 ; RUN: llc -verify-machineinstrs -mtriple=powerpc64-unknown-linux-gnu \
5 ; RUN: -mattr=-vsx < %s | FileCheck %s --check-prefix=CHECK-NOVSX
6 ; RUN: llc -verify-machineinstrs -mtriple=powerpc64-unknown-linux-gnu \
7 ; RUN: -mcpu=pwr7 < %s | FileCheck %s --check-prefix=CHECK-PWR7
8 ; RUN: llc -verify-machineinstrs -mtriple=powerpc64-unknown-aix -mcpu=pwr7 \
9 ; RUN: < %s | FileCheck %s --check-prefix=CHECK-PWR7
10 ; RUN: llc -verify-machineinstrs -mtriple=powerpc-unknown-aix -mcpu=pwr8 < %s |\
11 ; RUN: FileCheck %s --check-prefix=CHECK-PWR8
13 define dso_local double @fmsub_t0(double %d, double %d2, double %d3) {
14 ; CHECK-PWR8-LABEL: fmsub_t0:
15 ; CHECK-PWR8: # %bb.0: # %entry
16 ; CHECK-PWR8-NEXT: xsmsubmdp 1, 2, 3
17 ; CHECK-PWR8-NEXT: blr
19 ; CHECK-NOVSX-LABEL: fmsub_t0:
20 ; CHECK-NOVSX: # %bb.0: # %entry
21 ; CHECK-NOVSX-NEXT: fmsub 1, 1, 2, 3
22 ; CHECK-NOVSX-NEXT: blr
24 ; CHECK-PWR7-LABEL: fmsub_t0:
25 ; CHECK-PWR7: # %bb.0: # %entry
26 ; CHECK-PWR7-NEXT: xsmsubmdp 1, 2, 3
27 ; CHECK-PWR7-NEXT: blr
29 %0 = tail call double @llvm.ppc.fmsub(double %d, double %d2, double %d3)
33 declare double @llvm.ppc.fmsub(double, double, double)
35 define dso_local float @fmsubs_t0(float %f, float %f2, float %f3) {
36 ; CHECK-PWR8-LABEL: fmsubs_t0:
37 ; CHECK-PWR8: # %bb.0: # %entry
38 ; CHECK-PWR8-NEXT: xsmsubmsp 1, 2, 3
39 ; CHECK-PWR8-NEXT: blr
41 ; CHECK-NOVSX-LABEL: fmsubs_t0:
42 ; CHECK-NOVSX: # %bb.0: # %entry
43 ; CHECK-NOVSX-NEXT: fmsubs 1, 1, 2, 3
44 ; CHECK-NOVSX-NEXT: blr
46 ; CHECK-PWR7-LABEL: fmsubs_t0:
47 ; CHECK-PWR7: # %bb.0: # %entry
48 ; CHECK-PWR7-NEXT: fmsubs 1, 1, 2, 3
49 ; CHECK-PWR7-NEXT: blr
51 %0 = tail call float @llvm.ppc.fmsubs(float %f, float %f2, float %f3)
55 declare float @llvm.ppc.fmsubs(float, float, float)
57 define dso_local double @fnmadd_t0(double %d, double %d2, double %d3) {
58 ; CHECK-PWR8-LABEL: fnmadd_t0:
59 ; CHECK-PWR8: # %bb.0: # %entry
60 ; CHECK-PWR8-NEXT: xsnmaddmdp 1, 2, 3
61 ; CHECK-PWR8-NEXT: blr
63 ; CHECK-NOVSX-LABEL: fnmadd_t0:
64 ; CHECK-NOVSX: # %bb.0: # %entry
65 ; CHECK-NOVSX-NEXT: fnmadd 1, 1, 2, 3
66 ; CHECK-NOVSX-NEXT: blr
68 ; CHECK-PWR7-LABEL: fnmadd_t0:
69 ; CHECK-PWR7: # %bb.0: # %entry
70 ; CHECK-PWR7-NEXT: xsnmaddmdp 1, 2, 3
71 ; CHECK-PWR7-NEXT: blr
73 %0 = tail call double @llvm.ppc.fnmadd(double %d, double %d2, double %d3)
77 declare double @llvm.ppc.fnmadd(double, double, double)
79 define dso_local float @fnmadds_t0(float %f, float %f2, float %f3) {
80 ; CHECK-PWR8-LABEL: fnmadds_t0:
81 ; CHECK-PWR8: # %bb.0: # %entry
82 ; CHECK-PWR8-NEXT: xsnmaddmsp 1, 2, 3
83 ; CHECK-PWR8-NEXT: blr
85 ; CHECK-NOVSX-LABEL: fnmadds_t0:
86 ; CHECK-NOVSX: # %bb.0: # %entry
87 ; CHECK-NOVSX-NEXT: fnmadds 1, 1, 2, 3
88 ; CHECK-NOVSX-NEXT: blr
90 ; CHECK-PWR7-LABEL: fnmadds_t0:
91 ; CHECK-PWR7: # %bb.0: # %entry
92 ; CHECK-PWR7-NEXT: fnmadds 1, 1, 2, 3
93 ; CHECK-PWR7-NEXT: blr
95 %0 = tail call float @llvm.ppc.fnmadds(float %f, float %f2, float %f3)
99 declare float @llvm.ppc.fnmadds(float, float, float)
101 define dso_local double @fnmsub_t0(double %d, double %d2, double %d3) {
102 ; CHECK-PWR8-LABEL: fnmsub_t0:
103 ; CHECK-PWR8: # %bb.0: # %entry
104 ; CHECK-PWR8-NEXT: xsnmsubmdp 1, 2, 3
105 ; CHECK-PWR8-NEXT: blr
107 ; CHECK-NOVSX-LABEL: fnmsub_t0:
108 ; CHECK-NOVSX: # %bb.0: # %entry
109 ; CHECK-NOVSX-NEXT: fnmsub 1, 1, 2, 3
110 ; CHECK-NOVSX-NEXT: blr
112 ; CHECK-PWR7-LABEL: fnmsub_t0:
113 ; CHECK-PWR7: # %bb.0: # %entry
114 ; CHECK-PWR7-NEXT: xsnmsubmdp 1, 2, 3
115 ; CHECK-PWR7-NEXT: blr
117 %0 = tail call double @llvm.ppc.fnmsub(double %d, double %d2, double %d3)
121 declare double @llvm.ppc.fnmsub(double, double, double)
123 define dso_local float @fnmsubs_t0(float %f, float %f2, float %f3) {
124 ; CHECK-PWR8-LABEL: fnmsubs_t0:
125 ; CHECK-PWR8: # %bb.0: # %entry
126 ; CHECK-PWR8-NEXT: xsnmsubmsp 1, 2, 3
127 ; CHECK-PWR8-NEXT: blr
129 ; CHECK-NOVSX-LABEL: fnmsubs_t0:
130 ; CHECK-NOVSX: # %bb.0: # %entry
131 ; CHECK-NOVSX-NEXT: fnmsubs 1, 1, 2, 3
132 ; CHECK-NOVSX-NEXT: blr
134 ; CHECK-PWR7-LABEL: fnmsubs_t0:
135 ; CHECK-PWR7: # %bb.0: # %entry
136 ; CHECK-PWR7-NEXT: fnmsubs 1, 1, 2, 3
137 ; CHECK-PWR7-NEXT: blr
139 %0 = tail call float @llvm.ppc.fnmsubs(float %f, float %f2, float %f3)
143 declare float @llvm.ppc.fnmsubs(float, float, float)
145 define dso_local double @fre(double %d) {
146 ; CHECK-PWR8-LABEL: fre:
147 ; CHECK-PWR8: # %bb.0: # %entry
148 ; CHECK-PWR8-NEXT: xsredp 1, 1
149 ; CHECK-PWR8-NEXT: blr
151 ; CHECK-NOVSX-LABEL: fre:
152 ; CHECK-NOVSX: # %bb.0: # %entry
153 ; CHECK-NOVSX-NEXT: fre 1, 1
154 ; CHECK-NOVSX-NEXT: blr
156 ; CHECK-PWR7-LABEL: fre:
157 ; CHECK-PWR7: # %bb.0: # %entry
158 ; CHECK-PWR7-NEXT: xsredp 1, 1
159 ; CHECK-PWR7-NEXT: blr
161 %0 = tail call double @llvm.ppc.fre(double %d)
165 declare double @llvm.ppc.fre(double)
167 define dso_local float @fres(float %f) {
168 ; CHECK-PWR8-LABEL: fres:
169 ; CHECK-PWR8: # %bb.0: # %entry
170 ; CHECK-PWR8-NEXT: xsresp 1, 1
171 ; CHECK-PWR8-NEXT: blr
173 ; CHECK-NOVSX-LABEL: fres:
174 ; CHECK-NOVSX: # %bb.0: # %entry
175 ; CHECK-NOVSX-NEXT: fres 1, 1
176 ; CHECK-NOVSX-NEXT: blr
178 ; CHECK-PWR7-LABEL: fres:
179 ; CHECK-PWR7: # %bb.0: # %entry
180 ; CHECK-PWR7-NEXT: fres 1, 1
181 ; CHECK-PWR7-NEXT: blr
183 %0 = tail call float @llvm.ppc.fres(float %f)
187 declare float @llvm.ppc.fres(float)