1 ; RUN: llc -march=hexagon < %s | FileCheck %s
4 ; CHECK: r{{[0-9]+}}:{{[0-9]+}} += dfmpylh(r{{[0-9]+}}:{{[0-9]+}},r{{[0-9]+}}:{{[0-9]+}})
5 define dso_local double @t1(double %a, double %b, double %c) local_unnamed_addr #0 {
7 %0 = tail call double @llvm.hexagon.F2.dfmpylh(double %a, double %b, double %c) #2
11 declare double @llvm.hexagon.F2.dfmpylh(double, double, double) #1
14 ; CHECK: r{{[0-9]+}}:{{[0-9]+}} += dfmpyhh(r{{[0-9]+}}:{{[0-9]+}},r{{[0-9]+}}:{{[0-9]+}})
15 define dso_local double @t2(double %a, double %b, double %c) local_unnamed_addr #0 {
17 %0 = tail call double @llvm.hexagon.F2.dfmpyhh(double %a, double %b, double %c) #2
21 declare double @llvm.hexagon.F2.dfmpyhh(double, double, double) #1
24 ; CHECK: r{{[0-9]+}}:{{[0-9]+}} = dfmax(r{{[0-9]+}}:{{[0-9]+}},r{{[0-9]+}}:{{[0-9]+}})
25 define dso_local double @t3(double %a, double %b) local_unnamed_addr #0 {
27 %0 = tail call double @llvm.hexagon.F2.dfmax(double %a, double %b) #2
31 declare double @llvm.hexagon.F2.dfmax(double, double) #1
34 ; CHECK: r{{[0-9]+}}:{{[0-9]+}} = dfmin(r{{[0-9]+}}:{{[0-9]+}},r{{[0-9]+}}:{{[0-9]+}})
35 define dso_local double @t4(double %a, double %b) local_unnamed_addr #0 {
37 %0 = tail call double @llvm.hexagon.F2.dfmin(double %a, double %b) #2
41 declare double @llvm.hexagon.F2.dfmin(double, double) #1
44 ; CHECK: r{{[0-9]+}}:{{[0-9]+}} = dfmpyfix(r{{[0-9]+}}:{{[0-9]+}},r{{[0-9]+}}:{{[0-9]+}})
45 define dso_local double @t5(double %a, double %b) local_unnamed_addr #0 {
47 %0 = tail call double @llvm.hexagon.F2.dfmpyfix(double %a, double %b) #2
51 declare double @llvm.hexagon.F2.dfmpyfix(double, double) #1
54 ; CHECK: r{{[0-9]+}}:{{[0-9]+}} = dfmpyll(r{{[0-9]+}}:{{[0-9]+}},r{{[0-9]+}}:{{[0-9]+}})
55 define dso_local double @t6(double %a, double %b) local_unnamed_addr #0 {
57 %0 = tail call double @llvm.hexagon.F2.dfmpyll(double %a, double %b) #2
61 declare double @llvm.hexagon.F2.dfmpyll(double, double) #1
64 ; CHECK:r{{[0-9]+}}:{{[0-9]+}} = cmpyrw(r{{[0-9]+}}:{{[0-9]+}},r{{[0-9]+}}:{{[0-9]+}}*)
65 define dso_local i64 @t7(i64 %a, i64 %b) local_unnamed_addr #0 {
67 %0 = tail call i64 @llvm.hexagon.M7.vdmpy(i64 %a, i64 %b)
71 declare i64 @llvm.hexagon.M7.vdmpy(i64, i64) #1
74 ; CHECK:r{{[0-9]+}}:{{[0-9]+}} += cmpyrw(r{{[0-9]+}}:{{[0-9]+}},r{{[0-9]+}}:{{[0-9]+}}*)
75 define dso_local i64 @t8(i64 %a, i64 %b, i64 %c) local_unnamed_addr #0 {
77 %0 = tail call i64 @llvm.hexagon.M7.vdmpy.acc(i64 %a, i64 %b, i64 %c)
81 declare i64 @llvm.hexagon.M7.vdmpy.acc(i64, i64, i64) #1
84 ; CHECK: r1:0 = cmpyrw(r1:0,r3:2)
85 define i64 @t9(i64 %rss, i64 %rtt) local_unnamed_addr #0 {
87 %0 = tail call i64 @llvm.hexagon.M7.dcmpyrw(i64 %rss, i64 %rtt)
91 declare i64 @llvm.hexagon.M7.dcmpyrw(i64, i64) #1
94 ; CHECK: r1:0 += cmpyrw(r3:2,r5:4)
95 define i64 @t10(i64 %rxx, i64 %rss, i64 %rtt) local_unnamed_addr #0 {
97 %0 = tail call i64 @llvm.hexagon.M7.dcmpyrw.acc(i64 %rxx, i64 %rss, i64 %rtt)
101 declare i64 @llvm.hexagon.M7.dcmpyrw.acc(i64, i64, i64) #1
104 ; CHECK: r1:0 = cmpyrw(r1:0,r3:2*)
105 define i64 @t11(i64 %rss, i64 %rtt) local_unnamed_addr #0 {
107 %0 = tail call i64 @llvm.hexagon.M7.dcmpyrwc(i64 %rss, i64 %rtt)
111 declare i64 @llvm.hexagon.M7.dcmpyrwc(i64, i64) #1
114 ; CHECK: r1:0 += cmpyrw(r3:2,r5:4*)
115 define i64 @t12(i64 %rxx, i64 %rss, i64 %rtt) local_unnamed_addr #0 {
117 %0 = tail call i64 @llvm.hexagon.M7.dcmpyrwc.acc(i64 %rxx, i64 %rss, i64 %rtt)
121 declare i64 @llvm.hexagon.M7.dcmpyrwc.acc(i64, i64, i64) #1
124 ; CHECK: r1:0 = cmpyiw(r1:0,r3:2)
125 define i64 @t13(i64 %rss, i64 %rtt) local_unnamed_addr #0 {
127 %0 = tail call i64 @llvm.hexagon.M7.dcmpyiw(i64 %rss, i64 %rtt)
131 declare i64 @llvm.hexagon.M7.dcmpyiw(i64, i64) #1
134 ; CHECK: r1:0 += cmpyiw(r3:2,r5:4)
135 define i64 @t14(i64 %rxx, i64 %rss, i64 %rtt) local_unnamed_addr #0 {
137 %0 = tail call i64 @llvm.hexagon.M7.dcmpyiw.acc(i64 %rxx, i64 %rss, i64 %rtt)
141 declare i64 @llvm.hexagon.M7.dcmpyiw.acc(i64, i64, i64) #1
144 ; CHECK: r1:0 = cmpyiw(r1:0,r3:2*)
145 define i64 @t15(i64 %rss, i64 %rtt) local_unnamed_addr #0 {
147 %0 = tail call i64 @llvm.hexagon.M7.dcmpyiwc(i64 %rss, i64 %rtt)
151 declare i64 @llvm.hexagon.M7.dcmpyiwc(i64, i64) #1
154 ; CHECK: r1:0 += cmpyiw(r3:2,r5:4*)
155 define i64 @t16(i64 %rxx, i64 %rss, i64 %rtt) local_unnamed_addr #0 {
157 %0 = tail call i64 @llvm.hexagon.M7.dcmpyiwc.acc(i64 %rxx, i64 %rss, i64 %rtt)
161 declare i64 @llvm.hexagon.M7.dcmpyiwc.acc(i64, i64, i64) #1
164 ; CHECK: r0 = cmpyrw(r1:0,r3:2):<<1:sat
165 define i32 @t17(i64 %rss, i64 %rtt) local_unnamed_addr #0 {
167 %0 = tail call i32 @llvm.hexagon.M7.wcmpyrw(i64 %rss, i64 %rtt)
171 declare i32 @llvm.hexagon.M7.wcmpyrw(i64, i64) #1
174 ; CHECK: r0 = cmpyrw(r1:0,r3:2*):<<1:sat
175 define i32 @t18(i64 %rss, i64 %rtt) local_unnamed_addr #0 {
177 %0 = tail call i32 @llvm.hexagon.M7.wcmpyrwc(i64 %rss, i64 %rtt)
181 declare i32 @llvm.hexagon.M7.wcmpyrwc(i64, i64) #1
184 ; CHECK: r0 = cmpyiw(r1:0,r3:2):<<1:sat
185 define i32 @t19(i64 %rss, i64 %rtt) local_unnamed_addr #0 {
187 %0 = tail call i32 @llvm.hexagon.M7.wcmpyiw(i64 %rss, i64 %rtt)
191 declare i32 @llvm.hexagon.M7.wcmpyiw(i64, i64) #1
194 ; CHECK: r0 = cmpyiw(r1:0,r3:2*):<<1:sat
195 define i32 @t20(i64 %rss, i64 %rtt) local_unnamed_addr #0 {
197 %0 = tail call i32 @llvm.hexagon.M7.wcmpyiwc(i64 %rss, i64 %rtt)
201 declare i32 @llvm.hexagon.M7.wcmpyiwc(i64, i64) #1
204 ; CHECK: r0 = cmpyrw(r1:0,r3:2):<<1:rnd:sat
205 define i32 @t21(i64 %rss, i64 %rtt) local_unnamed_addr #0 {
207 %0 = tail call i32 @llvm.hexagon.M7.wcmpyrw.rnd(i64 %rss, i64 %rtt)
211 declare i32 @llvm.hexagon.M7.wcmpyrw.rnd(i64, i64) #1
214 ; CHECK: r0 = cmpyrw(r1:0,r3:2*):<<1:rnd:sat
215 define i32 @t22(i64 %rss, i64 %rtt) local_unnamed_addr #0 {
217 %0 = tail call i32 @llvm.hexagon.M7.wcmpyrwc.rnd(i64 %rss, i64 %rtt)
221 declare i32 @llvm.hexagon.M7.wcmpyrwc.rnd(i64, i64) #1
224 ; CHECK: r0 = cmpyiw(r1:0,r3:2):<<1:rnd:sat
225 define i32 @t23(i64 %rss, i64 %rtt) local_unnamed_addr #0 {
227 %0 = tail call i32 @llvm.hexagon.M7.wcmpyiw.rnd(i64 %rss, i64 %rtt)
231 declare i32 @llvm.hexagon.M7.wcmpyiw.rnd(i64, i64) #1
234 ; CHECK: r0 = cmpyiw(r1:0,r3:2*):<<1:rnd:sat
235 define i32 @t24(i64 %rss, i64 %rtt) local_unnamed_addr #0 {
237 %0 = tail call i32 @llvm.hexagon.M7.wcmpyiwc.rnd(i64 %rss, i64 %rtt)
241 declare i32 @llvm.hexagon.M7.wcmpyiwc.rnd(i64, i64) #1
244 ; CHECK: r1:0 = cround(r1:0,#0)
245 define i64 @t25(i64 %rss) local_unnamed_addr #0 {
247 %0 = tail call i64 @llvm.hexagon.A7.croundd.ri(i64 %rss, i32 0)
251 declare i64 @llvm.hexagon.A7.croundd.ri(i64, i32) #1
254 ; CHECK: r1:0 = cround(r1:0,r2)
255 define i64 @t26(i64 %rss, i32 %rt) local_unnamed_addr #0 {
257 %0 = tail call i64 @llvm.hexagon.A7.croundd.rr(i64 %rss, i32 %rt)
261 declare i64 @llvm.hexagon.A7.croundd.rr(i64, i32) #1
264 ; CHECK: r0 = clip(r0,#0)
265 define i32 @t27(i32 %rs) local_unnamed_addr #0 {
267 %0 = tail call i32 @llvm.hexagon.A7.clip(i32 %rs, i32 0)
271 declare i32 @llvm.hexagon.A7.clip(i32, i32) #1
274 ; CHECK: r1:0 = vclip(r1:0,#0)
275 define i64 @t28(i64 %rs) local_unnamed_addr #0 {
277 %0 = tail call i64 @llvm.hexagon.A7.vclip(i64 %rs, i32 0)
281 declare i64 @llvm.hexagon.A7.vclip(i64, i32) #1
283 attributes #0 = { nounwind readnone "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "less-precise-fpmad"="false" "no-frame-pointer-elim"="true" "no-frame-pointer-elim-non-leaf" "no-infs-fp-math"="false" "no-jump-tables"="false" "no-nans-fp-math"="false" "no-signed-zeros-fp-math"="false" "no-trapping-math"="false" "stack-protector-buffer-size"="8" "target-cpu"="hexagonv67" "target-features"="-long-calls" "unsafe-fp-math"="false" "use-soft-float"="false" }
284 attributes #1 = { readnone }
285 attributes #2 = { nounwind }