aboutsummaryrefslogtreecommitdiff
path: root/llvm/test/CodeGen/RISCV/rvv/vcpop-compute-known-bits.ll
blob: 7c569da9291dbe125435b79e0de6eaaf9546d605 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 5
; RUN: llc < %s -mtriple=riscv32 -mattr=+v | FileCheck %s --check-prefixes=CHECK,RV32
; RUN: llc < %s -mtriple=riscv64 -mattr=+v | FileCheck %s --check-prefixes=CHECK,RV64

define i32 @test(<8 x i1> %mask) {
; CHECK-LABEL: test:
; CHECK:       # %bb.0:
; CHECK-NEXT:    vsetivli zero, 8, e8, mf2, ta, ma
; CHECK-NEXT:    vcpop.m a0, v0
; CHECK-NEXT:    ret
    %1 = bitcast <8 x i1> %mask to i8
    %2 = call range(i8 0, 9) i8 @llvm.ctpop.i8(i8 %1)
    %3 = zext nneg i8 %2 to i32
    ret i32 %3
}
;; NOTE: These prefixes are unused and the list is autogenerated. Do not add tests below this line:
; RV32: {{.*}}
; RV64: {{.*}}