|
1 | 1 | ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
|
2 | 2 | ; RUN: sed 's/iXLen/i32/g' %s | llc -mtriple=riscv32 -mattr=+v \
|
3 |
| -; RUN: -verify-machineinstrs | FileCheck %s |
| 3 | +; RUN: -verify-machineinstrs | FileCheck %s --check-prefixes=CHECK,VLENUNKNOWN |
4 | 4 | ; RUN: sed 's/iXLen/i64/g' %s | llc -mtriple=riscv64 -mattr=+v \
|
5 |
| -; RUN: -verify-machineinstrs | FileCheck %s |
| 5 | +; RUN: -verify-machineinstrs | FileCheck %s --check-prefixes=CHECK,VLENUNKNOWN |
| 6 | +; RUN: sed 's/iXLen/i32/g' %s | llc -mtriple=riscv32 -mattr=+v \ |
| 7 | +; RUN: -riscv-v-vector-bits-max=128 -verify-machineinstrs \ |
| 8 | +; RUN: | FileCheck %s --check-prefixes=CHECK,VLEN128 |
| 9 | +; RUN: sed 's/iXLen/i64/g' %s | llc -mtriple=riscv64 -mattr=+v \ |
| 10 | +; RUN: -riscv-v-vector-bits-max=128 -verify-machineinstrs \ |
| 11 | +; RUN: | FileCheck %s --check-prefixes=CHECK,VLEN128 |
6 | 12 |
|
7 | 13 | declare iXLen @llvm.riscv.vsetvli.iXLen(iXLen, iXLen, iXLen)
|
8 | 14 | declare iXLen @llvm.riscv.vsetvlimax.iXLen(iXLen, iXLen)
|
@@ -135,3 +141,18 @@ define iXLen @test_vsetvli_negone_e8m1(iXLen %avl) nounwind {
|
135 | 141 | %vl = call iXLen @llvm.riscv.vsetvli.iXLen(iXLen -1, iXLen 0, iXLen 0)
|
136 | 142 | ret iXLen %vl
|
137 | 143 | }
|
| 144 | + |
| 145 | +define iXLen @test_vsetvli_eqvlmax_e8m8(iXLen %avl) nounwind { |
| 146 | +; VLENUNKNOWN-LABEL: test_vsetvli_eqvlmax_e8m8: |
| 147 | +; VLENUNKNOWN: # %bb.0: |
| 148 | +; VLENUNKNOWN-NEXT: li a0, 128 |
| 149 | +; VLENUNKNOWN-NEXT: vsetvli a0, a0, e8, m8, ta, ma |
| 150 | +; VLENUNKNOWN-NEXT: ret |
| 151 | +; |
| 152 | +; VLEN128-LABEL: test_vsetvli_eqvlmax_e8m8: |
| 153 | +; VLEN128: # %bb.0: |
| 154 | +; VLEN128-NEXT: vsetvli a0, zero, e8, m8, ta, ma |
| 155 | +; VLEN128-NEXT: ret |
| 156 | + %vl = call iXLen @llvm.riscv.vsetvli.iXLen(iXLen 128, iXLen 0, iXLen 3) |
| 157 | + ret iXLen %vl |
| 158 | +} |
0 commit comments