1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -verify-machineinstrs -mtriple=powerpc64le-unknown-linux-gnu \
3 ; RUN: -mcpu=pwr8 -ppc-asm-full-reg-names -ppc-vsr-nums-as-vr < %s | FileCheck %s
4 ; RUN: llc -verify-machineinstrs -mtriple=powerpc64-aix-xcoff \
5 ; RUN: -mcpu=pwr8 -ppc-asm-full-reg-names -ppc-vsr-nums-as-vr < %s | FileCheck %s
6 ; RUN: llc -verify-machineinstrs -mtriple=powerpc-aix-xcoff \
7 ; RUN: -mcpu=pwr8 -ppc-asm-full-reg-names -ppc-vsr-nums-as-vr < %s | FileCheck %s
9 define void @test1(<16 x i8> %0) {
11 ; CHECK: # %bb.0: # %entry
14 %1 = tail call <4 x i32> @llvm.ppc.altivec.vsum4sbs(<16 x i8> %0, <4 x i32> zeroinitializer)
18 define void @test2(<8 x i16> %0) {
20 ; CHECK: # %bb.0: # %entry
23 %1 = tail call <4 x i32> @llvm.ppc.altivec.vsum4shs(<8 x i16> %0, <4 x i32> zeroinitializer)
27 define void @test3(<16 x i8> %0) {
29 ; CHECK: # %bb.0: # %entry
32 %1 = tail call <4 x i32> @llvm.ppc.altivec.vsum4ubs(<16 x i8> %0, <4 x i32> zeroinitializer)
36 define void @test4(<16 x i8> %0) {
38 ; CHECK: # %bb.0: # %entry
39 ; CHECK-NEXT: vspltisw v3, 1
40 ; CHECK-NEXT: vsum4sbs v2, v2, v3
43 %1 = tail call <4 x i32> @llvm.ppc.altivec.vsum4sbs(<16 x i8> %0, <4 x i32> <i32 1, i32 1, i32 1, i32 1>)
47 define void @test5(<8 x i16> %0) {
49 ; CHECK: # %bb.0: # %entry
50 ; CHECK-NEXT: vspltisw v3, 1
51 ; CHECK-NEXT: vsum4shs v2, v2, v3
54 %1 = tail call <4 x i32> @llvm.ppc.altivec.vsum4shs(<8 x i16> %0, <4 x i32> <i32 1, i32 1, i32 1, i32 1>)
58 define void @test6(<16 x i8> %0) {
60 ; CHECK: # %bb.0: # %entry
61 ; CHECK-NEXT: vspltisw v3, 1
62 ; CHECK-NEXT: vsum4ubs v2, v2, v3
65 %1 = tail call <4 x i32> @llvm.ppc.altivec.vsum4ubs(<16 x i8> %0, <4 x i32> <i32 1, i32 1, i32 1, i32 1>)
69 define <4 x i32> @test7(<16 x i8> %0) {
71 ; CHECK: # %bb.0: # %entry
72 ; CHECK-NEXT: xxlxor v3, v3, v3
73 ; CHECK-NEXT: vsum4sbs v2, v2, v3
76 %1 = tail call <4 x i32> @llvm.ppc.altivec.vsum4sbs(<16 x i8> %0, <4 x i32> zeroinitializer)
80 define <4 x i32> @test8(<8 x i16> %0) {
82 ; CHECK: # %bb.0: # %entry
83 ; CHECK-NEXT: xxlxor v3, v3, v3
84 ; CHECK-NEXT: vsum4shs v2, v2, v3
87 %1 = tail call <4 x i32> @llvm.ppc.altivec.vsum4shs(<8 x i16> %0, <4 x i32> zeroinitializer)
91 define <4 x i32> @test9(<16 x i8> %0) {
93 ; CHECK: # %bb.0: # %entry
94 ; CHECK-NEXT: xxlxor v3, v3, v3
95 ; CHECK-NEXT: vsum4ubs v2, v2, v3
98 %1 = tail call <4 x i32> @llvm.ppc.altivec.vsum4ubs(<16 x i8> %0, <4 x i32> zeroinitializer)
102 define <4 x i32> @test10(<16 x i8> %0, <16 x i8> %1) {
103 ; CHECK-LABEL: test10:
104 ; CHECK: # %bb.0: # %entry
105 ; CHECK-NEXT: xxlxor v3, v3, v3
106 ; CHECK-NEXT: vsum4sbs v2, v2, v3
109 %2 = tail call <4 x i32> @llvm.ppc.altivec.vsum4sbs(<16 x i8> %0, <4 x i32> zeroinitializer)
110 %3 = tail call <4 x i32> @llvm.ppc.altivec.vsum4sbs(<16 x i8> %1, <4 x i32> zeroinitializer)
114 define <4 x i32> @test11(<8 x i16> %0, <8 x i16> %1) {
115 ; CHECK-LABEL: test11:
116 ; CHECK: # %bb.0: # %entry
117 ; CHECK-NEXT: xxlxor v3, v3, v3
118 ; CHECK-NEXT: vsum4shs v2, v2, v3
121 %2 = tail call <4 x i32> @llvm.ppc.altivec.vsum4shs(<8 x i16> %0, <4 x i32> zeroinitializer)
122 %3 = tail call <4 x i32> @llvm.ppc.altivec.vsum4shs(<8 x i16> %1, <4 x i32> zeroinitializer)
126 define <4 x i32> @test12(<16 x i8> %0, <16 x i8> %1) {
127 ; CHECK-LABEL: test12:
128 ; CHECK: # %bb.0: # %entry
129 ; CHECK-NEXT: xxlxor v3, v3, v3
130 ; CHECK-NEXT: vsum4ubs v2, v2, v3
133 %2 = tail call <4 x i32> @llvm.ppc.altivec.vsum4ubs(<16 x i8> %0, <4 x i32> zeroinitializer)
134 %3 = tail call <4 x i32> @llvm.ppc.altivec.vsum4ubs(<16 x i8> %1, <4 x i32> zeroinitializer)
138 declare <4 x i32> @llvm.ppc.altivec.vsum4sbs(<16 x i8>, <4 x i32>)
139 declare <4 x i32> @llvm.ppc.altivec.vsum4shs(<8 x i16>, <4 x i32>)
140 declare <4 x i32> @llvm.ppc.altivec.vsum4ubs(<16 x i8>, <4 x i32>)