[PATCH] D117081: [RISCV] Add more i64 splat vector test.
Jianjian Guan via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 11 19:21:22 PST 2022
jacquesguan created this revision.
jacquesguan added reviewers: craig.topper, asb, luismarques, frasercrmck, HsiangKai, khchen, benshi001.
Herald added subscribers: VincentWu, luke957, achieveartificialintelligence, vkmr, evandro, apazos, sameer.abuasal, s.egerton, Jim, benna, psnobl, jocewei, PkmX, the_o, brucehoult, MartinMosbeck, rogfer01, edward-jones, zzheng, jrtc27, kito-cheng, niosHD, sabuasal, simoncook, johnrusso, rbar.
jacquesguan requested review of this revision.
Herald added subscribers: llvm-commits, MaskRay.
Herald added a project: LLVM.
Precommit test for D117079 <https://reviews.llvm.org/D117079>.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D117081
Files:
llvm/test/CodeGen/RISCV/rvv/vmv.v.x-rv32.ll
Index: llvm/test/CodeGen/RISCV/rvv/vmv.v.x-rv32.ll
===================================================================
--- llvm/test/CodeGen/RISCV/rvv/vmv.v.x-rv32.ll
+++ llvm/test/CodeGen/RISCV/rvv/vmv.v.x-rv32.ll
@@ -724,3 +724,83 @@
ret <vscale x 8 x i64> %a
}
+
+define <vscale x 1 x i64> @intrinsic_vmv.v.x_i_nxv1i64_vlmax() nounwind {
+; CHECK-LABEL: intrinsic_vmv.v.x_i_nxv1i64_vlmax:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: addi sp, sp, -16
+; CHECK-NEXT: li a0, 3
+; CHECK-NEXT: sw a0, 12(sp)
+; CHECK-NEXT: sw a0, 8(sp)
+; CHECK-NEXT: vsetvli a0, zero, e64, m1, ta, mu
+; CHECK-NEXT: addi a0, sp, 8
+; CHECK-NEXT: vlse64.v v8, (a0), zero
+; CHECK-NEXT: addi sp, sp, 16
+; CHECK-NEXT: ret
+entry:
+ %a = call <vscale x 1 x i64> @llvm.riscv.vmv.v.x.nxv1i64(
+ i64 12884901891,
+ i32 -1)
+
+ ret <vscale x 1 x i64> %a
+}
+
+define <vscale x 2 x i64> @intrinsic_vmv.v.x_i_nxv2i64_vlmax() nounwind {
+; CHECK-LABEL: intrinsic_vmv.v.x_i_nxv2i64_vlmax:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: addi sp, sp, -16
+; CHECK-NEXT: li a0, 3
+; CHECK-NEXT: sw a0, 12(sp)
+; CHECK-NEXT: sw a0, 8(sp)
+; CHECK-NEXT: vsetvli a0, zero, e64, m2, ta, mu
+; CHECK-NEXT: addi a0, sp, 8
+; CHECK-NEXT: vlse64.v v8, (a0), zero
+; CHECK-NEXT: addi sp, sp, 16
+; CHECK-NEXT: ret
+entry:
+ %a = call <vscale x 2 x i64> @llvm.riscv.vmv.v.x.nxv2i64(
+ i64 12884901891,
+ i32 -1)
+
+ ret <vscale x 2 x i64> %a
+}
+
+define <vscale x 4 x i64> @intrinsic_vmv.v.x_i_nxv4i64_vlmax() nounwind {
+; CHECK-LABEL: intrinsic_vmv.v.x_i_nxv4i64_vlmax:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: addi sp, sp, -16
+; CHECK-NEXT: li a0, 3
+; CHECK-NEXT: sw a0, 12(sp)
+; CHECK-NEXT: sw a0, 8(sp)
+; CHECK-NEXT: vsetvli a0, zero, e64, m4, ta, mu
+; CHECK-NEXT: addi a0, sp, 8
+; CHECK-NEXT: vlse64.v v8, (a0), zero
+; CHECK-NEXT: addi sp, sp, 16
+; CHECK-NEXT: ret
+entry:
+ %a = call <vscale x 4 x i64> @llvm.riscv.vmv.v.x.nxv4i64(
+ i64 12884901891,
+ i32 -1)
+
+ ret <vscale x 4 x i64> %a
+}
+
+define <vscale x 8 x i64> @intrinsic_vmv.v.x_i_nxv8i64_vlmax() nounwind {
+; CHECK-LABEL: intrinsic_vmv.v.x_i_nxv8i64_vlmax:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: addi sp, sp, -16
+; CHECK-NEXT: li a0, 3
+; CHECK-NEXT: sw a0, 12(sp)
+; CHECK-NEXT: sw a0, 8(sp)
+; CHECK-NEXT: vsetvli a0, zero, e64, m8, ta, mu
+; CHECK-NEXT: addi a0, sp, 8
+; CHECK-NEXT: vlse64.v v8, (a0), zero
+; CHECK-NEXT: addi sp, sp, 16
+; CHECK-NEXT: ret
+entry:
+ %a = call <vscale x 8 x i64> @llvm.riscv.vmv.v.x.nxv8i64(
+ i64 12884901891,
+ i32 -1)
+
+ ret <vscale x 8 x i64> %a
+}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D117081.399180.patch
Type: text/x-patch
Size: 2702 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220112/7a4aad03/attachment.bin>
More information about the llvm-commits
mailing list