1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -verify-machineinstrs -mcpu=pwr9 -ppc-asm-full-reg-names \
3 ; RUN: -ppc-vsr-nums-as-vr -mtriple=powerpc64le-unknown-linux-gnu < %s | \
4 ; RUN: FileCheck %s --check-prefix=CHECK-LE-P9
5 ; RUN: llc -verify-machineinstrs -mcpu=pwr9 -ppc-asm-full-reg-names \
6 ; RUN: -ppc-vsr-nums-as-vr -mtriple=powerpc64-unknown-linux-gnu < %s | \
7 ; RUN: FileCheck %s --check-prefix=CHECK-BE-P9
8 ; RUN: llc -verify-machineinstrs -mcpu=pwr9 -ppc-asm-full-reg-names \
9 ; RUN: -ppc-vsr-nums-as-vr -mtriple=powerpc64-ibm-aix < %s | \
10 ; RUN: FileCheck %s --check-prefix=CHECK-AIX-64-P9
11 ; RUN: llc -verify-machineinstrs -mcpu=pwr9 -ppc-asm-full-reg-names \
12 ; RUN: -ppc-vsr-nums-as-vr -mtriple=powerpc-ibm-aix < %s | \
13 ; RUN: FileCheck %s --check-prefix=CHECK-AIX-32-P9
15 ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(none) uwtable
16 define dso_local noundef <16 x i8> @test1(<16 x i8> noundef %burn, <16 x i8> noundef %a, <16 x i8> noundef %b) local_unnamed_addr #0 {
17 ; CHECK-LE-P9-LABEL: test1:
18 ; CHECK-LE-P9: # %bb.0: # %entry
19 ; CHECK-LE-P9-NEXT: addis r3, r2, .LCPI0_0@toc@ha
20 ; CHECK-LE-P9-NEXT: addi r3, r3, .LCPI0_0@toc@l
21 ; CHECK-LE-P9-NEXT: lxv vs0, 0(r3)
22 ; CHECK-LE-P9-NEXT: xxperm v4, v3, vs0
23 ; CHECK-LE-P9-NEXT: vaddubm v2, v4, v3
24 ; CHECK-LE-P9-NEXT: blr
26 ; CHECK-BE-P9-LABEL: test1:
27 ; CHECK-BE-P9: # %bb.0: # %entry
28 ; CHECK-BE-P9-NEXT: addis r3, r2, .LCPI0_0@toc@ha
29 ; CHECK-BE-P9-NEXT: addi r3, r3, .LCPI0_0@toc@l
30 ; CHECK-BE-P9-NEXT: lxv vs0, 0(r3)
31 ; CHECK-BE-P9-NEXT: xxperm v4, v3, vs0
32 ; CHECK-BE-P9-NEXT: vaddubm v2, v4, v3
33 ; CHECK-BE-P9-NEXT: blr
35 ; CHECK-AIX-64-P9-LABEL: test1:
36 ; CHECK-AIX-64-P9: # %bb.0: # %entry
37 ; CHECK-AIX-64-P9-NEXT: ld r3, L..C0(r2) # %const.0
38 ; CHECK-AIX-64-P9-NEXT: lxv vs0, 0(r3)
39 ; CHECK-AIX-64-P9-NEXT: xxperm v4, v3, vs0
40 ; CHECK-AIX-64-P9-NEXT: vaddubm v2, v4, v3
41 ; CHECK-AIX-64-P9-NEXT: blr
43 ; CHECK-AIX-32-P9-LABEL: test1:
44 ; CHECK-AIX-32-P9: # %bb.0: # %entry
45 ; CHECK-AIX-32-P9-NEXT: lwz r3, L..C0(r2) # %const.0
46 ; CHECK-AIX-32-P9-NEXT: lxv vs0, 0(r3)
47 ; CHECK-AIX-32-P9-NEXT: xxperm v4, v3, vs0
48 ; CHECK-AIX-32-P9-NEXT: vaddubm v2, v4, v3
49 ; CHECK-AIX-32-P9-NEXT: blr
51 %shuffle = shufflevector <16 x i8> %a, <16 x i8> %b, <16 x i32> <i32 1, i32 18, i32 23, i32 12, i32 22, i32 22, i32 22, i32 22, i32 0, i32 0, i32 0, i32 0, i32 9, i32 9, i32 9, i32 9>
52 %add = add <16 x i8> %shuffle, %a
56 ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(none) uwtable
57 define dso_local noundef <16 x i8> @test2(<16 x i8> noundef %burn, <16 x i8> noundef %a, <16 x i8> noundef %b) local_unnamed_addr #0 {
58 ; CHECK-LE-P9-LABEL: test2:
59 ; CHECK-LE-P9: # %bb.0: # %entry
60 ; CHECK-LE-P9-NEXT: addis r3, r2, .LCPI1_0@toc@ha
61 ; CHECK-LE-P9-NEXT: addi r3, r3, .LCPI1_0@toc@l
62 ; CHECK-LE-P9-NEXT: lxv vs0, 0(r3)
63 ; CHECK-LE-P9-NEXT: xxperm v3, v4, vs0
64 ; CHECK-LE-P9-NEXT: vaddubm v2, v3, v4
65 ; CHECK-LE-P9-NEXT: blr
67 ; CHECK-BE-P9-LABEL: test2:
68 ; CHECK-BE-P9: # %bb.0: # %entry
69 ; CHECK-BE-P9-NEXT: addis r3, r2, .LCPI1_0@toc@ha
70 ; CHECK-BE-P9-NEXT: addi r3, r3, .LCPI1_0@toc@l
71 ; CHECK-BE-P9-NEXT: lxv vs0, 0(r3)
72 ; CHECK-BE-P9-NEXT: xxperm v3, v4, vs0
73 ; CHECK-BE-P9-NEXT: vaddubm v2, v3, v4
74 ; CHECK-BE-P9-NEXT: blr
76 ; CHECK-AIX-64-P9-LABEL: test2:
77 ; CHECK-AIX-64-P9: # %bb.0: # %entry
78 ; CHECK-AIX-64-P9-NEXT: ld r3, L..C1(r2) # %const.0
79 ; CHECK-AIX-64-P9-NEXT: lxv vs0, 0(r3)
80 ; CHECK-AIX-64-P9-NEXT: xxperm v3, v4, vs0
81 ; CHECK-AIX-64-P9-NEXT: vaddubm v2, v3, v4
82 ; CHECK-AIX-64-P9-NEXT: blr
84 ; CHECK-AIX-32-P9-LABEL: test2:
85 ; CHECK-AIX-32-P9: # %bb.0: # %entry
86 ; CHECK-AIX-32-P9-NEXT: lwz r3, L..C1(r2) # %const.0
87 ; CHECK-AIX-32-P9-NEXT: lxv vs0, 0(r3)
88 ; CHECK-AIX-32-P9-NEXT: xxperm v3, v4, vs0
89 ; CHECK-AIX-32-P9-NEXT: vaddubm v2, v3, v4
90 ; CHECK-AIX-32-P9-NEXT: blr
92 %shuffle = shufflevector <16 x i8> %a, <16 x i8> %b, <16 x i32> <i32 1, i32 18, i32 23, i32 12, i32 22, i32 22, i32 22, i32 22, i32 0, i32 0, i32 0, i32 0, i32 9, i32 9, i32 9, i32 9>
93 %add = add <16 x i8> %shuffle, %b
97 attributes #0 = {nounwind}