[llvm] 2e58d4b - [RISCV] Pre-commit test.

Han-Kuan Chen via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 17 22:33:12 PST 2022


Author: Han-Kuan Chen
Date: 2022-11-17T22:32:53-08:00
New Revision: 2e58d4bc4b3f449eac0d288f483049aba23a5f7c

URL: https://github.com/llvm/llvm-project/commit/2e58d4bc4b3f449eac0d288f483049aba23a5f7c
DIFF: https://github.com/llvm/llvm-project/commit/2e58d4bc4b3f449eac0d288f483049aba23a5f7c.diff

LOG: [RISCV] Pre-commit test.

Differential Revision: https://reviews.llvm.org/D138024

Added: 
    

Modified: 
    llvm/test/CodeGen/RISCV/rvv/fixed-vectors-int-shuffles.ll

Removed: 
    


################################################################################
diff  --git a/llvm/test/CodeGen/RISCV/rvv/fixed-vectors-int-shuffles.ll b/llvm/test/CodeGen/RISCV/rvv/fixed-vectors-int-shuffles.ll
index 6b41fd762fdb..92b72589a52d 100644
--- a/llvm/test/CodeGen/RISCV/rvv/fixed-vectors-int-shuffles.ll
+++ b/llvm/test/CodeGen/RISCV/rvv/fixed-vectors-int-shuffles.ll
@@ -639,3 +639,24 @@ define <8 x i32> @splice_binary2(<8 x i32> %x, <8 x i32> %y) {
   %s = shufflevector <8 x i32> %x, <8 x i32> %y, <8 x i32> <i32 undef, i32 6, i32 7, i32 8, i32 9, i32 10, i32 11, i32 12>
   ret <8 x i32> %s
 }
+
+define <4 x i16> @shuffle_shuffle_vslidedown(<16 x i16> %0) {
+; CHECK-LABEL: shuffle_shuffle_vslidedown:
+; CHECK:       # %bb.0: # %entry
+; CHECK-NEXT:    vsetivli zero, 8, e16, m2, ta, ma
+; CHECK-NEXT:    vslidedown.vi v10, v8, 8
+; CHECK-NEXT:    vsetivli zero, 4, e16, m1, ta, ma
+; CHECK-NEXT:    vslidedown.vi v8, v8, 4
+; CHECK-NEXT:    vsetivli zero, 3, e16, mf2, ta, ma
+; CHECK-NEXT:    vslidedown.vi v8, v8, 1
+; CHECK-NEXT:    vsetivli zero, 4, e16, mf2, tu, ma
+; CHECK-NEXT:    vslideup.vi v8, v10, 3
+; CHECK-NEXT:    ret
+entry:
+  %1 = shufflevector <16 x i16> %0, <16 x i16> poison, <8 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7>
+  %2 = shufflevector <16 x i16> %0, <16 x i16> poison, <8 x i32> <i32 8, i32 9, i32 10, i32 11, i32 12, i32 13, i32 14, i32 15>
+  %3 = shufflevector <8 x i16> %1, <8 x i16> poison, <4 x i32> <i32 4, i32 5, i32 6, i32 7>
+  %4 = shufflevector <8 x i16> %2, <8 x i16> poison, <4 x i32> <i32 0, i32 undef, i32 undef, i32 undef>
+  %5 = shufflevector <4 x i16> %3, <4 x i16> %4, <4 x i32> <i32 1, i32 2, i32 3, i32 4>
+  ret <4 x i16> %5
+}


        


More information about the llvm-commits mailing list