[llvm] 2f6b0b4 - [RISCV] Add SiFive sf.vqmacc tests to vmv-copy.mir. NFC (#124075)

via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 23 10:03:36 PST 2025


Author: Craig Topper
Date: 2025-01-23T10:03:33-08:00
New Revision: 2f6b0b4a8522b540de07c9ebd3446433e7d99eb6

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

LOG: [RISCV] Add SiFive sf.vqmacc tests to vmv-copy.mir. NFC (#124075)

The vqmaccu.2x8x2 test is currently being miscompiled. We need to use a
whole register move instead of vmv.v.v. The input has VL elements with
EEW=8 EMUL=4. The output has VL/4 elements with EEW=32 EMUL=4. We can't
use the original VL or input SEW for a vmv.v.v.

Added: 
    

Modified: 
    llvm/test/CodeGen/RISCV/rvv/vmv-copy.mir

Removed: 
    


################################################################################
diff  --git a/llvm/test/CodeGen/RISCV/rvv/vmv-copy.mir b/llvm/test/CodeGen/RISCV/rvv/vmv-copy.mir
index f7d5004e11752f..fad2b1b325a48c 100644
--- a/llvm/test/CodeGen/RISCV/rvv/vmv-copy.mir
+++ b/llvm/test/CodeGen/RISCV/rvv/vmv-copy.mir
@@ -280,6 +280,38 @@ body:             |
     $v24_v25_v26_v27_v28_v29_v30_v31 = COPY killed $v8_v9_v10_v11_v12_v13_v14_v15
 ...
 ---
+name: copy_sifive_custom_macc
+tracksRegLiveness: true
+body:             |
+  bb.0:
+    liveins: $x2, $x10, $v8, $v13, $v4m4, $v16m4
+    ; CHECK-LABEL: name: copy_sifive_custom_macc
+    ; CHECK: liveins: $x2, $x10, $v8, $v13, $v4m4, $v16m4
+    ; CHECK-NEXT: {{  $}}
+    ; CHECK-NEXT: $x0 = PseudoVSETVLI $x10, 66 /* e8, m4, ta, mu */, implicit-def $vl, implicit-def $vtype
+    ; CHECK-NEXT: early-clobber $v4m4 = PseudoVQMACCUS_2x8x2_M4 renamable $v4m4, killed renamable $v13, killed renamable $v16m4, $noreg, 3 /* e8 */, 1 /* ta, mu */, implicit $vl, implicit $vtype
+    ; CHECK-NEXT: $v16m4 = PseudoVMV_V_V_M4 undef $v16m4, $v4m4, $noreg, 3 /* e8 */, 0 /* tu, mu */, implicit $vl, implicit $vtype
+    $x0 = PseudoVSETVLI  $x10, 66, implicit-def $vl, implicit-def $vtype
+    early-clobber $v4m4 = PseudoVQMACCUS_2x8x2_M4 renamable $v4m4, killed renamable $v13, killed renamable $v16m4, $noreg, 3, 1, implicit $vl, implicit $vtype
+    $v16m4 = COPY renamable $v4m4
+...
+---
+name: copy_sifive_custom_macc1
+tracksRegLiveness: true
+body:             |
+  bb.0:
+    liveins: $x2, $x10, $v8, $v13, $v4m4, $v16m2
+    ; CHECK-LABEL: name: copy_sifive_custom_macc1
+    ; CHECK: liveins: $x2, $x10, $v8, $v13, $v4m4, $v16m2
+    ; CHECK-NEXT: {{  $}}
+    ; CHECK-NEXT: $x0 = PseudoVSETVLI $x10, 65 /* e8, m2, ta, mu */, implicit-def $vl, implicit-def $vtype
+    ; CHECK-NEXT: early-clobber $v4m4 = PseudoVQMACCUS_4x8x4_M2 renamable $v4m4, killed renamable $v13, killed renamable $v16m2, $noreg, 3 /* e8 */, 1 /* ta, mu */, implicit $vl, implicit $vtype
+    ; CHECK-NEXT: $v16m4 = VMV4R_V $v4m4, implicit $vtype
+    $x0 = PseudoVSETVLI  $x10, 65, implicit-def $vl, implicit-def $vtype
+    early-clobber $v4m4 = PseudoVQMACCUS_4x8x4_M2 renamable $v4m4, killed renamable $v13, killed renamable $v16m2, $noreg, 3, 1, implicit $vl, implicit $vtype
+    $v16m4 = COPY renamable $v4m4
+...
+---
 name: copy_narrow_copies_in_between
 tracksRegLiveness: true
 body:             |


        


More information about the llvm-commits mailing list