llvm-for-llvmta/test/CodeGen/RISCV/rvv/add-vsetvli-gpr.mir

57 lines
2.4 KiB
Plaintext
Raw Permalink Normal View History

2022-04-25 10:02:23 +02:00
# RUN: llc -mtriple riscv64 -mattr=+experimental-v %s \
# RUN: -start-before=finalize-isel -stop-after=finalize-isel -o - \
# RUN: | FileCheck --check-prefix=POST-INSERTER %s
# RUN: llc -mtriple riscv64 -mattr=+experimental-v %s \
# RUN: -start-before=finalize-isel -o - \
# RUN: | FileCheck --check-prefix=CODEGEN %s
--- |
define void @vadd_vint64m1(
<vscale x 1 x i64> *%pc,
<vscale x 1 x i64> *%pa,
<vscale x 1 x i64> *%pb,
i64 %vl)
{
ret void
}
...
---
name: vadd_vint64m1
tracksRegLiveness: true
body: |
bb.0 (%ir-block.0):
liveins: $x10, $x11, $x12, $x13
%3:gpr = COPY $x13
%2:gpr = COPY $x12
%1:gpr = COPY $x11
%0:gpr = COPY $x10
%4:vr = PseudoVLE64_V_M1 %1, %3, 64, implicit $vl, implicit $vtype :: (load unknown-size from %ir.pa, align 8)
%5:vr = PseudoVLE64_V_M1 %2, %3, 64, implicit $vl, implicit $vtype :: (load unknown-size from %ir.pb, align 8)
%6:vr = PseudoVADD_VV_M1 killed %4, killed %5, %3, 64, implicit $vl, implicit $vtype
PseudoVSE64_V_M1 killed %6, %0, %3, 64, implicit $vl, implicit $vtype :: (store unknown-size into %ir.pc, align 8)
PseudoRET
...
# POST-INSERTER: %0:gpr = COPY $x13
# POST-INSERTER: %1:gpr = COPY $x12
# POST-INSERTER: %2:gpr = COPY $x11
# POST-INSERTER: %3:gpr = COPY $x10
# POST-INSERTER: dead %7:gpr = PseudoVSETVLI %0, 88, implicit-def $vl, implicit-def $vtype
# POST-INSERTER: %4:vr = PseudoVLE64_V_M1 %2, $noreg, -1, implicit $vl, implicit $vtype :: (load unknown-size from %ir.pa, align 8)
# POST-INSERTER: dead %8:gpr = PseudoVSETVLI %0, 88, implicit-def $vl, implicit-def $vtype
# POST-INSERTER: %5:vr = PseudoVLE64_V_M1 %1, $noreg, -1, implicit $vl, implicit $vtype :: (load unknown-size from %ir.pb, align 8)
# POST-INSERTER: dead %9:gpr = PseudoVSETVLI %0, 88, implicit-def $vl, implicit-def $vtype
# POST-INSERTER: %6:vr = PseudoVADD_VV_M1 killed %4, killed %5, $noreg, -1, implicit $vl, implicit $vtype
# POST-INSERTER: dead %10:gpr = PseudoVSETVLI %0, 88, implicit-def $vl, implicit-def $vtype
# POST-INSERTER: PseudoVSE64_V_M1 killed %6, %3, $noreg, -1, implicit $vl, implicit $vtype :: (store unknown-size into %ir.pc, align 8)
# CODEGEN: vsetvli a3, a3, e64,m1,ta,mu
# CODEGEN-NEXT: vle64.v v25, (a1)
# CODEGEN-NEXT: vle64.v v26, (a2)
# CODEGEN-NEXT: vadd.vv v25, v25, v26
# CODEGEN-NEXT: vse64.v v25, (a0)
# CODEGEN-NEXT: ret