1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -O3 -mtriple=powerpc64le-unknown-unknown -ppc-asm-full-reg-names \
3 ; RUN: -verify-machineinstrs -mcpu=pwr7 < %s | FileCheck %s
4 define dso_local <16 x i8 > @vectorsaddb(<16 x i8 > %a, <16 x i8 > %b) {
5 ; CHECK-LABEL: vectorsaddb:
6 ; CHECK: # %bb.0: # %entry
7 ; CHECK-NEXT: vaddsbs v2, v2, v3
10 %call = call <16 x i8> @llvm.sadd.sat.v16i8(<16 x i8> %a, <16 x i8> %b)
14 define dso_local <16 x i8 > @vectorssubb(<16 x i8 > %a, <16 x i8 > %b) {
15 ; CHECK-LABEL: vectorssubb:
16 ; CHECK: # %bb.0: # %entry
17 ; CHECK-NEXT: vsubsbs v2, v2, v3
20 %call = call <16 x i8> @llvm.ssub.sat.v16i8(<16 x i8> %a, <16 x i8> %b)
24 define dso_local <16 x i8 > @vectoruaddb(<16 x i8 > %a, <16 x i8 > %b) {
25 ; CHECK-LABEL: vectoruaddb:
26 ; CHECK: # %bb.0: # %entry
27 ; CHECK-NEXT: vaddubs v2, v2, v3
30 %call = call <16 x i8> @llvm.uadd.sat.v16i8(<16 x i8> %a, <16 x i8> %b)
34 define dso_local <16 x i8 > @vectorusubb(<16 x i8 > %a, <16 x i8 > %b) {
35 ; CHECK-LABEL: vectorusubb:
36 ; CHECK: # %bb.0: # %entry
37 ; CHECK-NEXT: vsububs v2, v2, v3
40 %call = call <16 x i8> @llvm.usub.sat.v16i8(<16 x i8> %a, <16 x i8> %b)
44 define dso_local <8 x i16 > @vectorsaddh(<8 x i16 > %a, <8 x i16 > %b) {
45 ; CHECK-LABEL: vectorsaddh:
46 ; CHECK: # %bb.0: # %entry
47 ; CHECK-NEXT: vaddshs v2, v2, v3
50 %call = call <8 x i16> @llvm.sadd.sat.v8i16(<8 x i16> %a, <8 x i16> %b)
54 define dso_local <8 x i16 > @vectorssubh(<8 x i16 > %a, <8 x i16 > %b) {
55 ; CHECK-LABEL: vectorssubh:
56 ; CHECK: # %bb.0: # %entry
57 ; CHECK-NEXT: vsubshs v2, v2, v3
60 %call = call <8 x i16> @llvm.ssub.sat.v8i16(<8 x i16> %a, <8 x i16> %b)
64 define dso_local <8 x i16 > @vectoruaddh(<8 x i16 > %a, <8 x i16 > %b) {
65 ; CHECK-LABEL: vectoruaddh:
66 ; CHECK: # %bb.0: # %entry
67 ; CHECK-NEXT: vadduhs v2, v2, v3
70 %call = call <8 x i16> @llvm.uadd.sat.v8i16(<8 x i16> %a, <8 x i16> %b)
74 define dso_local <8 x i16 > @vectorusubh(<8 x i16 > %a, <8 x i16 > %b) {
75 ; CHECK-LABEL: vectorusubh:
76 ; CHECK: # %bb.0: # %entry
77 ; CHECK-NEXT: vsubuhs v2, v2, v3
80 %call = call <8 x i16> @llvm.usub.sat.v8i16(<8 x i16> %a, <8 x i16> %b)
84 define dso_local <4 x i32 > @vectorsaddw(<4 x i32 > %a, <4 x i32 > %b) {
85 ; CHECK-LABEL: vectorsaddw:
86 ; CHECK: # %bb.0: # %entry
87 ; CHECK-NEXT: vaddsws v2, v2, v3
90 %call = call <4 x i32> @llvm.sadd.sat.v4i32(<4 x i32> %a, <4 x i32> %b)
94 define dso_local <4 x i32 > @vectorssubw(<4 x i32 > %a, <4 x i32 > %b) {
95 ; CHECK-LABEL: vectorssubw:
96 ; CHECK: # %bb.0: # %entry
97 ; CHECK-NEXT: vsubsws v2, v2, v3
100 %call = call <4 x i32> @llvm.ssub.sat.v4i32(<4 x i32> %a, <4 x i32> %b)
104 define dso_local <4 x i32 > @vectoruaddw(<4 x i32 > %a, <4 x i32 > %b) {
105 ; CHECK-LABEL: vectoruaddw:
106 ; CHECK: # %bb.0: # %entry
107 ; CHECK-NEXT: vadduws v2, v2, v3
110 %call = call <4 x i32> @llvm.uadd.sat.v4i32(<4 x i32> %a, <4 x i32> %b)
114 define dso_local <4 x i32 > @vectorusubw(<4 x i32 > %a, <4 x i32 > %b) {
115 ; CHECK-LABEL: vectorusubw:
116 ; CHECK: # %bb.0: # %entry
117 ; CHECK-NEXT: vsubuws v2, v2, v3
120 %call = call <4 x i32> @llvm.usub.sat.v4i32(<4 x i32> %a, <4 x i32> %b)
124 declare <16 x i8> @llvm.sadd.sat.v16i8(<16 x i8>, <16 x i8>)
125 declare <16 x i8> @llvm.ssub.sat.v16i8(<16 x i8>, <16 x i8>)
126 declare <16 x i8> @llvm.uadd.sat.v16i8(<16 x i8>, <16 x i8>)
127 declare <16 x i8> @llvm.usub.sat.v16i8(<16 x i8>, <16 x i8>)
128 declare <8 x i16> @llvm.sadd.sat.v8i16(<8 x i16>, <8 x i16>)
129 declare <8 x i16> @llvm.ssub.sat.v8i16(<8 x i16>, <8 x i16>)
130 declare <8 x i16> @llvm.uadd.sat.v8i16(<8 x i16>, <8 x i16>)
131 declare <8 x i16> @llvm.usub.sat.v8i16(<8 x i16>, <8 x i16>)
132 declare <4 x i32> @llvm.sadd.sat.v4i32(<4 x i32>, <4 x i32>)
133 declare <4 x i32> @llvm.ssub.sat.v4i32(<4 x i32>, <4 x i32>)
134 declare <4 x i32> @llvm.uadd.sat.v4i32(<4 x i32>, <4 x i32>)
135 declare <4 x i32> @llvm.usub.sat.v4i32(<4 x i32>, <4 x i32>)