[llvm] [RISCV][VLOPT] Make sure all instructions in isSupportedInstr has test coverage (PR #119412)
Michael Maitland via llvm-commits
llvm-commits at lists.llvm.org
Tue Dec 10 08:38:22 PST 2024
================
@@ -1415,6 +1772,23 @@ define <vscale x 4 x i32> @vmv_v_i(<vscale x 4 x i32> %a, i32 %x, iXLen %vl) {
ret <vscale x 4 x i32> %2
}
+define <vscale x 4 x i32> @vmv_v_v(<vscale x 4 x i32> %a, <vscale x 4 x i32> %v, iXLen %vl) {
+; NOVLOPT-LABEL: vmv_v_v:
+; NOVLOPT: # %bb.0:
+; NOVLOPT-NEXT: vsetvli zero, a0, e32, m2, ta, ma
+; NOVLOPT-NEXT: vadd.vv v8, v10, v8
+; NOVLOPT-NEXT: ret
+;
+; VLOPT-LABEL: vmv_v_v:
+; VLOPT: # %bb.0:
+; VLOPT-NEXT: vsetvli zero, a0, e32, m2, ta, ma
+; VLOPT-NEXT: vadd.vv v8, v10, v8
+; VLOPT-NEXT: ret
+ %1 = call <vscale x 4 x i32> @llvm.riscv.vmv.v.v.nxv4i32(<vscale x 4 x i32> poison, <vscale x 4 x i32> %v, iXLen -1)
----------------
michaelmaitland wrote:
I'm not sure if we should include this test, since the copy probably gets optimized away before the optimizer
https://github.com/llvm/llvm-project/pull/119412
More information about the llvm-commits
mailing list