1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 4
2 ; RUN: llc -mtriple=powerpc64le-unknown-linux-gnu -mattr=+altivec -ppc-asm-full-reg-names < %s | FileCheck %s --check-prefixes=LE
3 ; RUN: llc -mtriple=powerpc64-unknown-linux-gnu -mattr=+altivec,+direct-move -ppc-asm-full-reg-names < %s | FileCheck %s --check-prefixes=BE
41 define <16 x i8> @test1(<16 x i8> %a) {
44 ; LE-NEXT: addis r3, r2, .LCPI0_0@toc@ha
45 ; LE-NEXT: xxlxor vs36, vs36, vs36
46 ; LE-NEXT: addi r3, r3, .LCPI0_0@toc@l
47 ; LE-NEXT: lxvd2x vs0, 0, r3
48 ; LE-NEXT: xxswapd vs35, vs0
49 ; LE-NEXT: vperm v2, v4, v2, v3
54 ; BE-NEXT: addis r3, r2, .LCPI0_0@toc@ha
55 ; BE-NEXT: xxlxor vs36, vs36, vs36
56 ; BE-NEXT: addi r3, r3, .LCPI0_0@toc@l
57 ; BE-NEXT: lxvw4x vs35, 0, r3
58 ; BE-NEXT: vperm v2, v2, v4, v3
60 %shuffle = shufflevector <16 x i8> %a, <16 x i8> zeroinitializer, <16 x i32> <i32 0, i32 16, i32 1, i32 16, i32 2, i32 16, i32 3, i32 16, i32 poison, i32 16, i32 poison, i32 16, i32 poison, i32 16, i32 poison, i32 16>
61 ret <16 x i8> %shuffle
82 define <16 x i8> @test2(<16 x i8> %a) {
85 ; LE-NEXT: addis r3, r2, .LCPI1_0@toc@ha
86 ; LE-NEXT: xxlxor vs36, vs36, vs36
87 ; LE-NEXT: addi r3, r3, .LCPI1_0@toc@l
88 ; LE-NEXT: lxvd2x vs0, 0, r3
89 ; LE-NEXT: xxswapd vs35, vs0
90 ; LE-NEXT: vperm v2, v2, v4, v3
95 ; BE-NEXT: xxlxor vs35, vs35, vs35
96 ; BE-NEXT: vmrghb v2, v3, v2
98 %shuffle = shufflevector <16 x i8> %a, <16 x i8> zeroinitializer, <16 x i32> <i32 16, i32 0, i32 16, i32 1, i32 16, i32 2, i32 16, i32 3, i32 16, i32 4, i32 poison, i32 5, i32 poison, i32 6, i32 poison, i32 7>
99 ret <16 x i8> %shuffle