|
1 | 1 | ; REQUIRES: asserts
|
2 |
| -; RUN: opt -passes=loop-vectorize -mtriple riscv64 -mattr=+v,+zvfh -prefer-predicate-over-epilogue=scalar-epilogue -debug-only=loop-vectorize,vplan --disable-output -riscv-v-register-bit-width-lmul=1 -S < %s 2>&1 | FileCheck %s --check-prefix=ZVFH |
3 |
| -; RUN: opt -passes=loop-vectorize -mtriple riscv64 -mattr=+v,+zvfhmin -prefer-predicate-over-epilogue=scalar-epilogue -debug-only=loop-vectorize,vplan --disable-output -riscv-v-register-bit-width-lmul=1 -S < %s 2>&1 | FileCheck %s --check-prefix=ZVFHMIN |
4 |
| - |
5 |
| -; TODO: -prefer-predicate-over-epilogue=scalar-epilogue was added to allow |
6 |
| -; unrolling. Calculate register pressure for all VPlans, not just unrolled ones, |
7 |
| -; and remove. |
| 2 | +; RUN: opt -passes=loop-vectorize -mtriple riscv64 -mattr=+v,+zvfh -debug-only=loop-vectorize,vplan --disable-output -riscv-v-register-bit-width-lmul=1 -S < %s 2>&1 | FileCheck %s --check-prefix=ZVFH |
| 3 | +; RUN: opt -passes=loop-vectorize -mtriple riscv64 -mattr=+v,+zvfhmin -debug-only=loop-vectorize,vplan --disable-output -riscv-v-register-bit-width-lmul=1 -S < %s 2>&1 | FileCheck %s --check-prefix=ZVFHMIN |
8 | 4 |
|
9 | 5 | define void @add(ptr noalias nocapture readonly %src1, ptr noalias nocapture readonly %src2, i32 signext %size, ptr noalias nocapture writeonly %result) {
|
10 |
| -; CHECK-LABEL: add |
11 |
| -; ZVFH: LV(REG): Found max usage: 2 item |
12 |
| -; ZVFH-NEXT: LV(REG): RegisterClass: RISCV::GPRRC, 3 registers |
| 6 | +; ZVFH-LABEL: add |
| 7 | +; ZVFH: LV(REG): VF = vscale x 4 |
| 8 | +; ZVFH-NEXT: LV(REG): Found max usage: 2 item |
| 9 | +; ZVFH-NEXT: LV(REG): RegisterClass: RISCV::GPRRC, 6 registers |
13 | 10 | ; ZVFH-NEXT: LV(REG): RegisterClass: RISCV::VRRC, 2 registers
|
14 | 11 | ; ZVFH-NEXT: LV(REG): Found invariant usage: 1 item
|
15 | 12 | ; ZVFH-NEXT: LV(REG): RegisterClass: RISCV::GPRRC, 1 registers
|
16 |
| -; ZVFHMIN: LV(REG): Found max usage: 2 item |
17 |
| -; ZVFHMIN-NEXT: LV(REG): RegisterClass: RISCV::GPRRC, 3 registers |
| 13 | +; ZVFHMIN-LABEL: add |
| 14 | +; ZVFHMIN: LV(REG): VF = vscale x 4 |
| 15 | +; ZVFHMIN-NEXT: LV(REG): Found max usage: 2 item |
| 16 | +; ZVFHMIN-NEXT: LV(REG): RegisterClass: RISCV::GPRRC, 6 registers |
18 | 17 | ; ZVFHMIN-NEXT: LV(REG): RegisterClass: RISCV::VRRC, 4 registers
|
19 | 18 | ; ZVFHMIN-NEXT: LV(REG): Found invariant usage: 1 item
|
20 | 19 | ; ZVFHMIN-NEXT: LV(REG): RegisterClass: RISCV::GPRRC, 1 registers
|
|
0 commit comments