Skip to content

Commit 21f4687

Browse files
committed
[RISCV][VCIX] Precommit test
1 parent 2afa975 commit 21f4687

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 5
2+
; RUN: sed 's/iXLen/i32/g' %s | llc -mtriple=riscv32 -mattr=+v,+xsfvcp \
3+
; RUN: -verify-machineinstrs | FileCheck %s --check-prefixes=CHECK
4+
; RUN: sed 's/iXLen/i64/g' %s | llc -mtriple=riscv64 -mattr=+v,+xsfvcp \
5+
; RUN: -verify-machineinstrs | FileCheck %s --check-prefixes=CHECK
6+
7+
; VCIX instructions can not reorder between each other.
8+
define void @test_reorder(<vscale x 1 x i64> %vreg) {
9+
; CHECK-LABEL: test_reorder:
10+
; CHECK: # %bb.0: # %entry
11+
; CHECK-NEXT: #APP
12+
; CHECK-NEXT: sf.vc.vv 3, 0, v8, v8
13+
; CHECK-EMPTY:
14+
; CHECK-NEXT: #NO_APP
15+
; CHECK-NEXT: vsetivli zero, 0, e64, m1, ta, ma
16+
; CHECK-NEXT: sf.vc.iv 0, 0, v8, 0
17+
; CHECK-NEXT: ret
18+
entry:
19+
call void @llvm.riscv.sf.vc.iv.se.iXLen.nxv1i64.iXLen.iXLen(iXLen 0, iXLen 0, <vscale x 1 x i64> %vreg, iXLen 0, iXLen 0)
20+
call iXLen asm sideeffect "sf.vc.vv 0x3, 0x0, $1, $1;", "=r,^vr,~{memory},~{vl},~{vcix_state}"(<vscale x 1 x i64> %vreg)
21+
ret void
22+
}

0 commit comments

Comments
 (0)