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=pwr10 -ppc-asm-full-reg-names -ppc-vsr-nums-as-vr < %s | \
5 ; RUN: llc -verify-machineinstrs -mtriple=powerpc64-unknown-linux-gnu \
6 ; RUN: -mcpu=pwr10 -ppc-asm-full-reg-names -ppc-vsr-nums-as-vr < %s | \
9 ; These test cases aim to test the vector string isolate builtins on Power10.
11 declare <16 x i8> @llvm.ppc.altivec.vclrlb(<16 x i8>, i32)
12 declare <16 x i8> @llvm.ppc.altivec.vclrrb(<16 x i8>, i32)
14 define <16 x i8> @test_vclrlb(<16 x i8> %a, i32 %n) {
15 ; CHECK-LABEL: test_vclrlb:
16 ; CHECK: # %bb.0: # %entry
17 ; CHECK-NEXT: vclrlb v2, v2, r5
20 %tmp = tail call <16 x i8> @llvm.ppc.altivec.vclrlb(<16 x i8> %a, i32 %n)
24 define <16 x i8> @test_vclrrb(<16 x i8> %a, i32 %n) {
25 ; CHECK-LABEL: test_vclrrb:
26 ; CHECK: # %bb.0: # %entry
27 ; CHECK-NEXT: vclrrb v2, v2, r5
30 %tmp = tail call <16 x i8> @llvm.ppc.altivec.vclrrb(<16 x i8> %a, i32 %n)
34 declare <16 x i8> @llvm.ppc.altivec.vstribr(<16 x i8>)
35 declare <16 x i8> @llvm.ppc.altivec.vstribl(<16 x i8>)
36 declare <8 x i16> @llvm.ppc.altivec.vstrihr(<8 x i16>)
37 declare <8 x i16> @llvm.ppc.altivec.vstrihl(<8 x i16>)
39 declare i32 @llvm.ppc.altivec.vstribr.p(i32, <16 x i8>)
40 declare i32 @llvm.ppc.altivec.vstribl.p(i32, <16 x i8>)
41 declare i32 @llvm.ppc.altivec.vstrihr.p(i32, <8 x i16>)
42 declare i32 @llvm.ppc.altivec.vstrihl.p(i32, <8 x i16>)
44 define <16 x i8> @test_vstribr(<16 x i8> %a) {
45 ; CHECK-LABEL: test_vstribr:
46 ; CHECK: # %bb.0: # %entry
47 ; CHECK-NEXT: vstribr v2, v2
50 %tmp = tail call <16 x i8> @llvm.ppc.altivec.vstribr(<16 x i8> %a)
54 define <16 x i8> @test_vstribl(<16 x i8> %a) {
55 ; CHECK-LABEL: test_vstribl:
56 ; CHECK: # %bb.0: # %entry
57 ; CHECK-NEXT: vstribl v2, v2
60 %tmp = tail call <16 x i8> @llvm.ppc.altivec.vstribl(<16 x i8>%a)
64 define <8 x i16> @test_vstrihr(<8 x i16> %a) {
65 ; CHECK-LABEL: test_vstrihr:
66 ; CHECK: # %bb.0: # %entry
67 ; CHECK-NEXT: vstrihr v2, v2
70 %tmp = tail call <8 x i16> @llvm.ppc.altivec.vstrihr(<8 x i16> %a)
74 define <8 x i16> @test_vstrihl(<8 x i16> %a) {
75 ; CHECK-LABEL: test_vstrihl:
76 ; CHECK: # %bb.0: # %entry
77 ; CHECK-NEXT: vstrihl v2, v2
80 %tmp = tail call <8 x i16> @llvm.ppc.altivec.vstrihl(<8 x i16> %a)
84 define i32 @test_vstribr_p(<16 x i8> %a) {
85 ; CHECK-LABEL: test_vstribr_p:
86 ; CHECK: # %bb.0: # %entry
87 ; CHECK-NEXT: vstribr. v2, v2
88 ; CHECK-NEXT: setbc r3, 4*cr6+eq
91 %tmp = tail call i32 @llvm.ppc.altivec.vstribr.p(i32 1, <16 x i8> %a)
95 define i32 @test_vstribl_p(<16 x i8> %a) {
96 ; CHECK-LABEL: test_vstribl_p:
97 ; CHECK: # %bb.0: # %entry
98 ; CHECK-NEXT: vstribl. v2, v2
99 ; CHECK-NEXT: setbc r3, 4*cr6+eq
102 %tmp = tail call i32 @llvm.ppc.altivec.vstribl.p(i32 1, <16 x i8> %a)
106 define i32 @test_vstrihr_p(<8 x i16> %a) {
107 ; CHECK-LABEL: test_vstrihr_p:
108 ; CHECK: # %bb.0: # %entry
109 ; CHECK-NEXT: vstrihr. v2, v2
110 ; CHECK-NEXT: setbc r3, 4*cr6+eq
113 %tmp = tail call i32 @llvm.ppc.altivec.vstrihr.p(i32 1, <8 x i16> %a)
117 define i32 @test_vstrihl_p(<8 x i16> %a) {
118 ; CHECK-LABEL: test_vstrihl_p:
119 ; CHECK: # %bb.0: # %entry
120 ; CHECK-NEXT: vstrihl. v2, v2
121 ; CHECK-NEXT: setbc r3, 4*cr6+eq
124 %tmp = tail call i32 @llvm.ppc.altivec.vstrihl.p(i32 1, <8 x i16> %a)