1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py UTC_ARGS: --version 5
2 # RUN: llc -mtriple=riscv64 -mattr=+v,+m -run-pass=instruction-select \
3 # RUN: -verify-machineinstrs %s -o - | FileCheck %s
9 tracksRegLiveness: true
12 ; CHECK-LABEL: name: negative_vl
13 ; CHECK: [[ADDI:%[0-9]+]]:gprnox0 = ADDI $x0, -2
14 ; CHECK-NEXT: [[PseudoVMCLR_M_B1_:%[0-9]+]]:vr = PseudoVMCLR_M_B1 [[ADDI]], 0 /* e8 */
15 ; CHECK-NEXT: $v0 = COPY [[PseudoVMCLR_M_B1_]]
16 ; CHECK-NEXT: PseudoRET implicit $v0
17 %0:gprb(s64) = G_CONSTANT i64 -2
18 %1:vrb(<vscale x 1 x s1>) = G_VMCLR_VL %0(s64)
19 $v0 = COPY %1(<vscale x 1 x s1>)
20 PseudoRET implicit $v0
26 tracksRegLiveness: true
30 ; CHECK-LABEL: name: nonconst_vl
31 ; CHECK: liveins: $x10
33 ; CHECK-NEXT: [[COPY:%[0-9]+]]:gprnox0 = COPY $x10
34 ; CHECK-NEXT: [[PseudoVMCLR_M_B1_:%[0-9]+]]:vr = PseudoVMCLR_M_B1 [[COPY]], 0 /* e8 */
35 ; CHECK-NEXT: $v0 = COPY [[PseudoVMCLR_M_B1_]]
36 ; CHECK-NEXT: PseudoRET implicit $v0
37 %0:gprb(s64) = COPY $x10
38 %1:vrb(<vscale x 1 x s1>) = G_VMCLR_VL %0(s64)
39 $v0 = COPY %1(<vscale x 1 x s1>)
40 PseudoRET implicit $v0
47 tracksRegLiveness: true
50 ; CHECK-LABEL: name: nonzero_vl
51 ; CHECK: [[PseudoVMCLR_M_B1_:%[0-9]+]]:vr = PseudoVMCLR_M_B1 1, 0 /* e8 */
52 ; CHECK-NEXT: $v0 = COPY [[PseudoVMCLR_M_B1_]]
53 ; CHECK-NEXT: PseudoRET implicit $v0
54 %0:gprb(s64) = G_CONSTANT i64 1
55 %1:vrb(<vscale x 1 x s1>) = G_VMCLR_VL %0(s64)
56 $v0 = COPY %1(<vscale x 1 x s1>)
57 PseudoRET implicit $v0
64 tracksRegLiveness: true
67 ; CHECK-LABEL: name: zero_vl
68 ; CHECK: [[PseudoVMCLR_M_B1_:%[0-9]+]]:vr = PseudoVMCLR_M_B1 0, 0 /* e8 */
69 ; CHECK-NEXT: $v0 = COPY [[PseudoVMCLR_M_B1_]]
70 ; CHECK-NEXT: PseudoRET implicit $v0
71 %0:gprb(s64) = G_CONSTANT i64 0
72 %1:vrb(<vscale x 1 x s1>) = G_VMCLR_VL %0(s64)
73 $v0 = COPY %1(<vscale x 1 x s1>)
74 PseudoRET implicit $v0