[llvm] 1b5f855 - [RISCV] Pre-commit test case for D148735. NFC

Craig Topper via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 20 14:05:09 PDT 2023


Author: Craig Topper
Date: 2023-04-20T13:58:19-07:00
New Revision: 1b5f8556daef5f706232f9f61129ba5f1d926709

URL: https://github.com/llvm/llvm-project/commit/1b5f8556daef5f706232f9f61129ba5f1d926709
DIFF: https://github.com/llvm/llvm-project/commit/1b5f8556daef5f706232f9f61129ba5f1d926709.diff

LOG: [RISCV] Pre-commit test case for D148735. NFC

Added: 
    

Modified: 
    llvm/test/CodeGen/RISCV/rvv/vsetvli-insert.ll

Removed: 
    


################################################################################
diff  --git a/llvm/test/CodeGen/RISCV/rvv/vsetvli-insert.ll b/llvm/test/CodeGen/RISCV/rvv/vsetvli-insert.ll
index 68b52cddec8b9..f0ae7bcafe139 100644
--- a/llvm/test/CodeGen/RISCV/rvv/vsetvli-insert.ll
+++ b/llvm/test/CodeGen/RISCV/rvv/vsetvli-insert.ll
@@ -555,6 +555,31 @@ define <vscale x 2 x i32> @avl_forward5(<vscale x 2 x i32>* %addr) {
   ret <vscale x 2 x i32> %ret
 }
 
+declare <vscale x 1 x double> @llvm.riscv.vfwadd.nxv1f64.nxv1f32.nxv1f32(<vscale x 1 x double>, <vscale x 1 x float>, <vscale x 1 x float>, i64)
+
+define <vscale x 1 x double> @test20(i64 %avl, <vscale x 1 x float> %a, <vscale x 1 x float> %b, <vscale x 1 x double> %c) nounwind {
+; CHECK-LABEL: test20:
+; CHECK:       # %bb.0: # %entry
+; CHECK-NEXT:    vsetvli a0, a0, e32, mf2, ta, ma
+; CHECK-NEXT:    vfwadd.vv v11, v8, v9
+; CHECK-NEXT:    vsetvli zero, a0, e64, m1, ta, ma
+; CHECK-NEXT:    vfadd.vv v8, v11, v10
+; CHECK-NEXT:    ret
+entry:
+  %0 = tail call i64 @llvm.riscv.vsetvli(i64 %avl, i64 2, i64 7)
+  %1 = tail call <vscale x 1 x double> @llvm.riscv.vfwadd.nxv1f64.nxv1f32.nxv1f32(
+    <vscale x 1 x double> undef,
+    <vscale x 1 x float> %a,
+    <vscale x 1 x float> %b,
+    i64 %0)
+  %2 = tail call <vscale x 1 x double> @llvm.riscv.vfadd.nxv1f64.nxv1f64(
+    <vscale x 1 x double> undef,
+    <vscale x 1 x double> %1,
+    <vscale x 1 x double> %c,
+    i64 %0)
+  ret <vscale x 1 x double> %2
+}
+
 declare <vscale x 1 x i64> @llvm.riscv.vadd.mask.nxv1i64.nxv1i64(
   <vscale x 1 x i64>,
   <vscale x 1 x i64>,


        


More information about the llvm-commits mailing list