| ; 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: {{.*}} |