1 ; RUN: llc < %s -mtriple=ve -mattr=+vpu | FileCheck %s
3 ;;; Test vector sum intrinsic instructions
6 ;;; We test VSUM*vl and VSUM*vml instructions.
8 ; Function Attrs: nounwind readnone
9 define fastcc <256 x double> @vsumwsx_vvl(<256 x double> %0) {
10 ; CHECK-LABEL: vsumwsx_vvl:
12 ; CHECK-NEXT: lea %s0, 256
14 ; CHECK-NEXT: vsum.w.sx %v0, %v0
15 ; CHECK-NEXT: b.l.t (, %s10)
16 %2 = tail call fast <256 x double> @llvm.ve.vl.vsumwsx.vvl(<256 x double> %0, i32 256)
20 ; Function Attrs: nounwind readnone
21 declare <256 x double> @llvm.ve.vl.vsumwsx.vvl(<256 x double>, i32)
23 ; Function Attrs: nounwind readnone
24 define fastcc <256 x double> @vsumwsx_vvml(<256 x double> %0, <256 x i1> %1) {
25 ; CHECK-LABEL: vsumwsx_vvml:
27 ; CHECK-NEXT: lea %s0, 256
29 ; CHECK-NEXT: vsum.w.sx %v0, %v0, %vm1
30 ; CHECK-NEXT: b.l.t (, %s10)
31 %3 = tail call fast <256 x double> @llvm.ve.vl.vsumwsx.vvml(<256 x double> %0, <256 x i1> %1, i32 256)
35 ; Function Attrs: nounwind readnone
36 declare <256 x double> @llvm.ve.vl.vsumwsx.vvml(<256 x double>, <256 x i1>, i32)
38 ; Function Attrs: nounwind readnone
39 define fastcc <256 x double> @vsumwzx_vvl(<256 x double> %0) {
40 ; CHECK-LABEL: vsumwzx_vvl:
42 ; CHECK-NEXT: lea %s0, 256
44 ; CHECK-NEXT: vsum.w.zx %v0, %v0
45 ; CHECK-NEXT: b.l.t (, %s10)
46 %2 = tail call fast <256 x double> @llvm.ve.vl.vsumwzx.vvl(<256 x double> %0, i32 256)
50 ; Function Attrs: nounwind readnone
51 declare <256 x double> @llvm.ve.vl.vsumwzx.vvl(<256 x double>, i32)
53 ; Function Attrs: nounwind readnone
54 define fastcc <256 x double> @vsumwzx_vvml(<256 x double> %0, <256 x i1> %1) {
55 ; CHECK-LABEL: vsumwzx_vvml:
57 ; CHECK-NEXT: lea %s0, 256
59 ; CHECK-NEXT: vsum.w.zx %v0, %v0, %vm1
60 ; CHECK-NEXT: b.l.t (, %s10)
61 %3 = tail call fast <256 x double> @llvm.ve.vl.vsumwzx.vvml(<256 x double> %0, <256 x i1> %1, i32 256)
65 ; Function Attrs: nounwind readnone
66 declare <256 x double> @llvm.ve.vl.vsumwzx.vvml(<256 x double>, <256 x i1>, i32)
68 ; Function Attrs: nounwind readnone
69 define fastcc <256 x double> @vsuml_vvl(<256 x double> %0) {
70 ; CHECK-LABEL: vsuml_vvl:
72 ; CHECK-NEXT: lea %s0, 256
74 ; CHECK-NEXT: vsum.l %v0, %v0
75 ; CHECK-NEXT: b.l.t (, %s10)
76 %2 = tail call fast <256 x double> @llvm.ve.vl.vsuml.vvl(<256 x double> %0, i32 256)
80 ; Function Attrs: nounwind readnone
81 declare <256 x double> @llvm.ve.vl.vsuml.vvl(<256 x double>, i32)
83 ; Function Attrs: nounwind readnone
84 define fastcc <256 x double> @vsuml_vvml(<256 x double> %0, <256 x i1> %1) {
85 ; CHECK-LABEL: vsuml_vvml:
87 ; CHECK-NEXT: lea %s0, 256
89 ; CHECK-NEXT: vsum.l %v0, %v0, %vm1
90 ; CHECK-NEXT: b.l.t (, %s10)
91 %3 = tail call fast <256 x double> @llvm.ve.vl.vsuml.vvml(<256 x double> %0, <256 x i1> %1, i32 256)
95 ; Function Attrs: nounwind readnone
96 declare <256 x double> @llvm.ve.vl.vsuml.vvml(<256 x double>, <256 x i1>, i32)