Debian Codegraph @

llvm/test/CodeGen/PowerPC/splat-extend.ll

raw
1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 5
2 ; RUN: llc -verify-machineinstrs -mtriple=powerpc64le-unknown-linux-gnu \
3 ; RUN: -mcpu=pwr9 -ppc-asm-full-reg-names -ppc-vsr-nums-as-vr < %s | \
4 ; RUN: FileCheck %s
5 ; RUN: llc -verify-machineinstrs -mtriple=powerpc64-aix-xcoff \
6 ; RUN: -mcpu=pwr9 -ppc-asm-full-reg-names -ppc-vsr-nums-as-vr < %s | \
7 ; RUN: FileCheck %s
8 ; RUN: llc -verify-machineinstrs -mtriple=powerpc-aix-xcoff \
9 ; RUN: -mcpu=pwr9 -ppc-asm-full-reg-names -ppc-vsr-nums-as-vr < %s | \
10 ; RUN: FileCheck %s
11
12 define dso_local noundef <8 x i16> @v103s() local_unnamed_addr {
13 ; CHECK-LABEL: v103s:
14 ; CHECK: # %bb.0: # %entry
15 ; CHECK-NEXT: xxspltib v2, 103
16 ; CHECK-NEXT: vupklsb v2, v2
17 ; CHECK-NEXT: blr
18 entry:
19 ret <8 x i16> splat (i16 103)
20 }
21
22 define dso_local noundef <2 x i64> @v103l() local_unnamed_addr {
23 ; CHECK-LABEL: v103l:
24 ; CHECK: # %bb.0: # %entry
25 ; CHECK-NEXT: xxspltib v2, 103
26 ; CHECK-NEXT: vextsb2d v2, v2
27 ; CHECK-NEXT: blr
28 entry:
29 ret <2 x i64> splat (i64 103)
30 }
31
32 define dso_local noundef <4 x i32> @v103i() local_unnamed_addr {
33 ; CHECK-LABEL: v103i:
34 ; CHECK: # %bb.0: # %entry
35 ; CHECK-NEXT: xxspltib v2, 103
36 ; CHECK-NEXT: vextsb2w v2, v2
37 ; CHECK-NEXT: blr
38 entry:
39 ret <4 x i32> splat (i32 103)
40 }
41
42 define dso_local noundef <2 x i64> @v11l() local_unnamed_addr {
43 ; CHECK-LABEL: v11l:
44 ; CHECK: # %bb.0: # %entry
45 ; CHECK-NEXT: vspltisw v2, -11
46 ; CHECK-NEXT: vupklsw v2, v2
47 ; CHECK-NEXT: blr
48 entry:
49 ret <2 x i64> splat (i64 -11)
50 }
51
52 declare <4 x i32> @llvm.ppc.altivec.vextsb2w(<16 x i8>)
53
54 define i32 @crash(ptr %p) {
55 ; CHECK-LABEL: crash:
56 ; CHECK: # %bb.0: # %entry
57 ; CHECK-NEXT: xxspltib v2, 127
58 ; CHECK-NEXT: vextsb2w v2, v2
59 ; CHECK-NEXT: stxv v2, 0(r3)
60 ; CHECK-NEXT: li r3, 0
61 ; CHECK-NEXT: stxv v2, 0(0)
62 ; CHECK-NEXT: blr
63 entry:
64 store <4 x i32> <i32 127, i32 127, i32 127, i32 127>, ptr %p, align 16
65 %0 = call <4 x i32> @llvm.ppc.altivec.vextsb2w(<16 x i8> <i8 127, i8 127, i8 127, i8 127, i8 127, i8 127, i8 127, i8 127, i8 127, i8 127, i8 127, i8 127, i8 127, i8 127, i8 127, i8 127>)
66 store <4 x i32> %0, ptr null, align 16
67 ret i32 0
68 }