Skip to content

Commit e31dc4a

Browse files
fixup! demonstrate the functionality supported in selectVLOp
1 parent 0222bc2 commit e31dc4a

File tree

4 files changed

+73
-0
lines changed

4 files changed

+73
-0
lines changed
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# RUN: not --crash llc -mtriple=riscv32 -mattr=+v,+m -run-pass=instruction-select \
2+
# RUN: -verify-machineinstrs %s 2>&1 | FileCheck %s
3+
4+
---
5+
# CHECK: LLVM ERROR: cannot select:
6+
name: bad_negative_vl
7+
legalized: true
8+
regBankSelected: true
9+
tracksRegLiveness: true
10+
body: |
11+
bb.1:
12+
%0:gprb(s32) = G_CONSTANT i32 -2
13+
%1:vrb(<vscale x 1 x s1>) = G_VMCLR_VL %0(s32)
14+
$v0 = COPY %1(<vscale x 1 x s1>)
15+
PseudoRET implicit $v0
16+
...
17+
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# RUN: not --crash llc -mtriple=riscv32 -mattr=+v,+m -run-pass=instruction-select \
2+
# RUN: -verify-machineinstrs %s 2>&1 | FileCheck %s
3+
4+
# FIXME: This should be supported in the future
5+
---
6+
name: not_implemented_vl_nonconst
7+
legalized: true
8+
regBankSelected: true
9+
tracksRegLiveness: true
10+
body: |
11+
bb.1:
12+
liveins: $x10
13+
%0:gprb(s32) = COPY $x10
14+
%1:vrb(<vscale x 1 x s1>) = G_VMCLR_VL %0(s32)
15+
$v0 = COPY %1(<vscale x 1 x s1>)
16+
PseudoRET implicit $v0
17+
18+
# CHECK: LLVM ERROR: cannot select
19+
...
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# RUN: not --crash llc -mtriple=riscv32 -mattr=+v,+m -run-pass=instruction-select \
2+
# RUN: -verify-machineinstrs %s 2>&1 | FileCheck %s
3+
4+
# FIXME: This should be supported in the future
5+
---
6+
name: not_implemented_vl_nonzero
7+
legalized: true
8+
regBankSelected: true
9+
tracksRegLiveness: true
10+
body: |
11+
bb.1:
12+
%0:gprb(s32) = G_CONSTANT i32 1
13+
%1:vrb(<vscale x 1 x s1>) = G_VMCLR_VL %0(s32)
14+
$v0 = COPY %1(<vscale x 1 x s1>)
15+
PseudoRET implicit $v0
16+
17+
# CHECK: LLVM ERROR: cannot select
18+
...
19+
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# RUN: not --crash llc -mtriple=riscv32 -mattr=+v,+m -run-pass=instruction-select \
2+
# RUN: -verify-machineinstrs %s 2>&1 | FileCheck %s
3+
4+
# FIXME: This should be supported in the future
5+
---
6+
# CHECK: LLVM ERROR: cannot select
7+
name: not_implemented_vl0
8+
legalized: true
9+
regBankSelected: true
10+
tracksRegLiveness: true
11+
body: |
12+
bb.1:
13+
%0:gprb(s32) = G_CONSTANT i32 0
14+
%1:vrb(<vscale x 1 x s1>) = G_VMCLR_VL %0(s32)
15+
$v0 = COPY %1(<vscale x 1 x s1>)
16+
PseudoRET implicit $v0
17+
18+
...

0 commit comments

Comments
 (0)