1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 3
2 ; RUN: llc -mtriple=riscv32 -mattr=+v,+zvl1024b -verify-machineinstrs < %s | FileCheck %s
3 ; RUN: llc -mtriple=riscv64 -mattr=+v,+zvl1024b -verify-machineinstrs < %s | FileCheck %s
5 ; There is no corresponding v1i256 type, so make sure we don't crash if we try
6 ; to lower via lowerBitreverseShuffle.
7 define <256 x i1> @reverse_v256i1(<256 x i1> %a) {
8 ; CHECK-LABEL: reverse_v256i1:
10 ; CHECK-NEXT: li a0, 256
11 ; CHECK-NEXT: vsetvli zero, a0, e8, m2, ta, ma
12 ; CHECK-NEXT: vmv.v.i v8, 0
13 ; CHECK-NEXT: vmerge.vim v8, v8, 1, v0
14 ; CHECK-NEXT: vid.v v10
15 ; CHECK-NEXT: vrsub.vi v10, v10, -1
16 ; CHECK-NEXT: vrgather.vv v12, v8, v10
17 ; CHECK-NEXT: vmsne.vi v0, v12, 0
19 %res = call <256 x i1> @llvm.experimental.vector.reverse.v256i1(<256 x i1> %a)
23 declare <256 x i1> @llvm.experimental.vector.reverse.v256i1(<256 x i1>)