Skip to content

Commit 3688672

Browse files
committed
fixup! Rename test
And add negative test case for fixed vectors.
1 parent c869bec commit 3688672

File tree

1 file changed

+51
-0
lines changed

1 file changed

+51
-0
lines changed

llvm/test/CodeGen/RISCV/rvv/scalable-vectors-interleaved-access.ll renamed to llvm/test/CodeGen/RISCV/rvv/vp-vector-interleaved-access.ll

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -615,5 +615,56 @@ define void @not_balanced_store_tree(<vscale x 1 x i32> %v0, <vscale x 2 x i32>
615615
ret void
616616
}
617617

618+
; We only support scalable vectors for now.
619+
define {<2 x i32>, <2 x i32>, <2 x i32>, <2 x i32>} @not_scalable_vectors(ptr %ptr, i32 %rvl) {
620+
; RV32-LABEL: not_scalable_vectors:
621+
; RV32: # %bb.0:
622+
; RV32-NEXT: vsetvli zero, a1, e32, m2, ta, ma
623+
; RV32-NEXT: vle32.v v8, (a0)
624+
; RV32-NEXT: li a0, 32
625+
; RV32-NEXT: vsetivli zero, 4, e32, m1, ta, ma
626+
; RV32-NEXT: vnsrl.wx v12, v8, a0
627+
; RV32-NEXT: vnsrl.wi v11, v8, 0
628+
; RV32-NEXT: vsetivli zero, 2, e32, mf2, ta, ma
629+
; RV32-NEXT: vnsrl.wx v10, v11, a0
630+
; RV32-NEXT: vnsrl.wi v8, v11, 0
631+
; RV32-NEXT: vnsrl.wx v11, v12, a0
632+
; RV32-NEXT: vnsrl.wi v9, v12, 0
633+
; RV32-NEXT: ret
634+
;
635+
; RV64-LABEL: not_scalable_vectors:
636+
; RV64: # %bb.0:
637+
; RV64-NEXT: slli a1, a1, 32
638+
; RV64-NEXT: srli a1, a1, 32
639+
; RV64-NEXT: vsetvli zero, a1, e32, m2, ta, ma
640+
; RV64-NEXT: vle32.v v8, (a0)
641+
; RV64-NEXT: li a0, 32
642+
; RV64-NEXT: vsetivli zero, 4, e32, m1, ta, ma
643+
; RV64-NEXT: vnsrl.wx v12, v8, a0
644+
; RV64-NEXT: vnsrl.wi v11, v8, 0
645+
; RV64-NEXT: vsetivli zero, 2, e32, mf2, ta, ma
646+
; RV64-NEXT: vnsrl.wx v10, v11, a0
647+
; RV64-NEXT: vnsrl.wi v8, v11, 0
648+
; RV64-NEXT: vnsrl.wx v11, v12, a0
649+
; RV64-NEXT: vnsrl.wi v9, v12, 0
650+
; RV64-NEXT: ret
651+
%wide.masked.load = call <8 x i32> @llvm.vp.load.v8i32.p0(ptr %ptr, <8 x i1> splat (i1 true), i32 %rvl)
652+
%d0 = call { <4 x i32>, <4 x i32> } @llvm.vector.deinterleave2.v8i32(<8 x i32> %wide.masked.load)
653+
%d0.0 = extractvalue { <4 x i32>, <4 x i32> } %d0, 0
654+
%d0.1 = extractvalue { <4 x i32>, <4 x i32> } %d0, 1
655+
%d1 = call { <2 x i32>, <2 x i32> } @llvm.vector.deinterleave2.v4i32(<4 x i32> %d0.0)
656+
%t0 = extractvalue { <2 x i32>, <2 x i32> } %d1, 0
657+
%t2 = extractvalue { <2 x i32>, <2 x i32> } %d1, 1
658+
%d2 = call { <2 x i32>, <2 x i32> } @llvm.vector.deinterleave2.v4i32(<4 x i32> %d0.1)
659+
%t1 = extractvalue { <2 x i32>, <2 x i32> } %d2, 0
660+
%t3 = extractvalue { <2 x i32>, <2 x i32> } %d2, 1
661+
662+
%res0 = insertvalue { <2 x i32>, <2 x i32>, <2 x i32>, <2 x i32> } undef, <2 x i32> %t0, 0
663+
%res1 = insertvalue { <2 x i32>, <2 x i32>, <2 x i32>, <2 x i32> } %res0, <2 x i32> %t1, 1
664+
%res2 = insertvalue { <2 x i32>, <2 x i32>, <2 x i32>, <2 x i32> } %res1, <2 x i32> %t2, 2
665+
%res3 = insertvalue { <2 x i32>, <2 x i32>, <2 x i32>, <2 x i32> } %res2, <2 x i32> %t3, 3
666+
ret { <2 x i32>, <2 x i32>, <2 x i32>, <2 x i32> } %res3
667+
}
668+
618669
;; NOTE: These prefixes are unused and the list is autogenerated. Do not add tests below this line:
619670
; CHECK: {{.*}}

0 commit comments

Comments
 (0)