File: vperm-swap.ll

package info (click to toggle)
llvm-toolchain-17 1%3A17.0.6-22
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,799,624 kB
  • sloc: cpp: 6,428,607; ansic: 1,383,196; asm: 793,408; python: 223,504; objc: 75,364; f90: 60,502; lisp: 33,869; pascal: 15,282; sh: 9,684; perl: 7,453; ml: 4,937; awk: 3,523; makefile: 2,889; javascript: 2,149; xml: 888; fortran: 619; cs: 573
file content (39 lines) | stat: -rw-r--r-- 2,165 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
; RUN: llc -verify-machineinstrs -mcpu=pwr8 -ppc-asm-full-reg-names \
; RUN:   -ppc-vsr-nums-as-vr -mtriple=powerpc64le-unknown-linux-gnu < %s | \
; RUN: FileCheck %s --check-prefix=CHECK-LE-P8

define <16 x i8> @test_none_v16i8(i8 %arg, ptr nocapture noundef readonly %b) {
; CHECK-LE-P8: .LCPI0_0:
; CHECK-LE-P8-NEXT: .byte   31                              # 0x1f
; CHECK-LE-P8-NEXT: .byte   30                              # 0x1e
; CHECK-LE-P8-NEXT: .byte   7                               # 0x7
; CHECK-LE-P8-NEXT: .byte   31                              # 0x1f
; CHECK-LE-P8-NEXT: .byte   31                              # 0x1f
; CHECK-LE-P8-NEXT: .byte   31                              # 0x1f
; CHECK-LE-P8-NEXT: .byte   31                              # 0x1f
; CHECK-LE-P8-NEXT: .byte   31                              # 0x1f
; CHECK-LE-P8-NEXT: .byte   31                              # 0x1f
; CHECK-LE-P8-NEXT: .byte   31                              # 0x1f
; CHECK-LE-P8-NEXT: .byte   31                              # 0x1f
; CHECK-LE-P8-NEXT: .byte   31                              # 0x1f
; CHECK-LE-P8-NEXT: .byte   31                              # 0x1f
; CHECK-LE-P8-NEXT: .byte   31                              # 0x1f
; CHECK-LE-P8-NEXT: .byte   31                              # 0x1f
; CHECK-LE-P8-NEXT: .byte   31                              # 0x1f
; CHECK-LE-P8-LABEL: test_none_v16i8:
; CHECK-LE-P8:       # %bb.0: # %entry
; CHECK-LE-P8-NEXT:    addis r5, r2, .LCPI0_0@toc@ha
; CHECK-LE-P8-NEXT:    lxvd2x vs0, 0, r4
; CHECK-LE-P8-NEXT:    mtvsrd v4, r3
; CHECK-LE-P8-NEXT:    addi r5, r5, .LCPI0_0@toc@l
; CHECK-LE-P8-NEXT:    lxvd2x vs1, 0, r5
; CHECK-LE-P8-NEXT:    xxswapd v2, vs0
; CHECK-LE-P8-NEXT:    xxswapd v3, vs1
; CHECK-LE-P8-NEXT:    vperm v2, v4, v2, v3
; CHECK-LE-P8-NEXT:    blr
entry:
  %lhs = load <16 x i8>, ptr %b, align 4
  %rhs = insertelement <16 x i8> undef, i8 %arg, i32 0
  %shuffle = shufflevector <16 x i8> %lhs, <16 x i8> %rhs, <16 x i32> <i32 0, i32 1, i32 16, i32 17, i32 18, i32 19, i32 20, i32 21, i32 22, i32 23, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef>
  ret <16 x i8> %shuffle
}