Skip to content

Commit 2f6b0b4

Browse files
authored
[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.
1 parent db6b7a8 commit 2f6b0b4

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

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

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -280,6 +280,38 @@ body: |
280280
$v24_v25_v26_v27_v28_v29_v30_v31 = COPY killed $v8_v9_v10_v11_v12_v13_v14_v15
281281
...
282282
---
283+
name: copy_sifive_custom_macc
284+
tracksRegLiveness: true
285+
body: |
286+
bb.0:
287+
liveins: $x2, $x10, $v8, $v13, $v4m4, $v16m4
288+
; CHECK-LABEL: name: copy_sifive_custom_macc
289+
; CHECK: liveins: $x2, $x10, $v8, $v13, $v4m4, $v16m4
290+
; CHECK-NEXT: {{ $}}
291+
; CHECK-NEXT: $x0 = PseudoVSETVLI $x10, 66 /* e8, m4, ta, mu */, implicit-def $vl, implicit-def $vtype
292+
; 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
293+
; CHECK-NEXT: $v16m4 = PseudoVMV_V_V_M4 undef $v16m4, $v4m4, $noreg, 3 /* e8 */, 0 /* tu, mu */, implicit $vl, implicit $vtype
294+
$x0 = PseudoVSETVLI $x10, 66, implicit-def $vl, implicit-def $vtype
295+
early-clobber $v4m4 = PseudoVQMACCUS_2x8x2_M4 renamable $v4m4, killed renamable $v13, killed renamable $v16m4, $noreg, 3, 1, implicit $vl, implicit $vtype
296+
$v16m4 = COPY renamable $v4m4
297+
...
298+
---
299+
name: copy_sifive_custom_macc1
300+
tracksRegLiveness: true
301+
body: |
302+
bb.0:
303+
liveins: $x2, $x10, $v8, $v13, $v4m4, $v16m2
304+
; CHECK-LABEL: name: copy_sifive_custom_macc1
305+
; CHECK: liveins: $x2, $x10, $v8, $v13, $v4m4, $v16m2
306+
; CHECK-NEXT: {{ $}}
307+
; CHECK-NEXT: $x0 = PseudoVSETVLI $x10, 65 /* e8, m2, ta, mu */, implicit-def $vl, implicit-def $vtype
308+
; 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
309+
; CHECK-NEXT: $v16m4 = VMV4R_V $v4m4, implicit $vtype
310+
$x0 = PseudoVSETVLI $x10, 65, implicit-def $vl, implicit-def $vtype
311+
early-clobber $v4m4 = PseudoVQMACCUS_4x8x4_M2 renamable $v4m4, killed renamable $v13, killed renamable $v16m2, $noreg, 3, 1, implicit $vl, implicit $vtype
312+
$v16m4 = COPY renamable $v4m4
313+
...
314+
---
283315
name: copy_narrow_copies_in_between
284316
tracksRegLiveness: true
285317
body: |

0 commit comments

Comments
 (0)