File: fixed-vectors-shuffle-reverse-bitrotate.ll

package info (click to toggle)
llvm-toolchain-19 1%3A19.1.7-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,998,520 kB
  • sloc: cpp: 6,951,680; ansic: 1,486,157; asm: 913,598; python: 232,024; f90: 80,126; objc: 75,281; lisp: 37,276; pascal: 16,990; sh: 10,009; ml: 5,058; perl: 4,724; awk: 3,523; makefile: 3,167; javascript: 2,504; xml: 892; fortran: 664; cs: 573
file content (23 lines) | stat: -rw-r--r-- 974 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 3
; RUN: llc -mtriple=riscv32 -mattr=+v,+zvl1024b -verify-machineinstrs < %s | FileCheck %s
; RUN: llc -mtriple=riscv64 -mattr=+v,+zvl1024b -verify-machineinstrs < %s | FileCheck %s

; There is no corresponding v1i256 type, so make sure we don't crash if we try
; to lower via lowerBitreverseShuffle.
define <256 x i1> @reverse_v256i1(<256 x i1> %a) {
; CHECK-LABEL: reverse_v256i1:
; CHECK:       # %bb.0:
; CHECK-NEXT:    li a0, 256
; CHECK-NEXT:    vsetvli zero, a0, e8, m2, ta, ma
; CHECK-NEXT:    vmv.v.i v8, 0
; CHECK-NEXT:    vmerge.vim v8, v8, 1, v0
; CHECK-NEXT:    vid.v v10
; CHECK-NEXT:    vrsub.vi v10, v10, -1
; CHECK-NEXT:    vrgather.vv v12, v8, v10
; CHECK-NEXT:    vmsne.vi v0, v12, 0
; CHECK-NEXT:    ret
  %res = call <256 x i1> @llvm.vector.reverse.v256i1(<256 x i1> %a)
  ret <256 x i1> %res
}

declare <256 x i1> @llvm.vector.reverse.v256i1(<256 x i1>)