• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; This test shows the evolution of RVV pseudo instructions within isel.
2
3; RUN: llc -mtriple riscv64 -mattr=+experimental-v %s -o %t.pre.mir \
4; RUN:     -stop-before=finalize-isel
5; RUN: cat %t.pre.mir | FileCheck --check-prefix=PRE-INSERTER %s
6
7; RUN: llc -mtriple riscv64 -mattr=+experimental-v %t.pre.mir -o %t.post.mir \
8; RUN:     -start-before=finalize-isel -stop-after=finalize-isel
9; RUN: cat %t.post.mir | FileCheck --check-prefix=POST-INSERTER %s
10
11define void @vadd_vint64m1(
12          <vscale x 1 x i64> *%pc,
13          <vscale x 1 x i64> *%pa,
14          <vscale x 1 x i64> *%pb)
15{
16  %va = load <vscale x 1 x i64>, <vscale x 1 x i64>* %pa
17  %vb = load <vscale x 1 x i64>, <vscale x 1 x i64>* %pb
18  %vc = add <vscale x 1 x i64> %va, %vb
19  store <vscale x 1 x i64> %vc, <vscale x 1 x i64> *%pc
20  ret void
21}
22
23; PRE-INSERTER: %4:vr = IMPLICIT_DEF
24; PRE-INSERTER: %3:vr = PseudoVLE64_V_M1 %4, %1, $noreg, $x0, 64, implicit $vl, implicit $vtype :: (load unknown-size from %ir.pa, align 8)
25; PRE-INSERTER: %6:vr = IMPLICIT_DEF
26; PRE-INSERTER: %5:vr = PseudoVLE64_V_M1 %6, %2, $noreg, $x0, 64, implicit $vl, implicit $vtype :: (load unknown-size from %ir.pb, align 8)
27; PRE-INSERTER: %8:vr = IMPLICIT_DEF
28; PRE-INSERTER: %7:vr = PseudoVADD_VV_M1 %8, killed %3, killed %5, $noreg, $x0, 64, implicit $vl, implicit $vtype
29; PRE-INSERTER: PseudoVSE64_V_M1 killed %7, %0, $noreg, $x0, 64, implicit $vl, implicit $vtype :: (store unknown-size into %ir.pc, align 8)
30
31; POST-INSERTER: %4:vr = IMPLICIT_DEF
32; POST-INSERTER: dead %9:gpr = PseudoVSETVLI $x0, 12, implicit-def $vl, implicit-def $vtype
33; POST-INSERTER: %3:vr = PseudoVLE64_V_M1 %4, %1, $noreg, $noreg, -1, implicit $vl, implicit $vtype :: (load unknown-size from %ir.pa, align 8)
34; POST-INSERTER: %6:vr = IMPLICIT_DEF
35; POST-INSERTER: dead %10:gpr = PseudoVSETVLI $x0, 12, implicit-def $vl, implicit-def $vtype
36; POST-INSERTER: %5:vr = PseudoVLE64_V_M1 %6, %2, $noreg, $noreg, -1, implicit $vl, implicit $vtype :: (load unknown-size from %ir.pb, align 8)
37; POST-INSERTER: %8:vr = IMPLICIT_DEF
38; POST-INSERTER: dead %11:gpr = PseudoVSETVLI $x0, 12, implicit-def $vl, implicit-def $vtype
39; POST-INSERTER: %7:vr = PseudoVADD_VV_M1 %8, killed %3, killed %5, $noreg, $noreg, -1, implicit $vl, implicit $vtype
40; POST-INSERTER: dead %12:gpr = PseudoVSETVLI $x0, 12, implicit-def $vl, implicit-def $vtype
41; POST-INSERTER: PseudoVSE64_V_M1 killed %7, %0, $noreg, $noreg, -1, implicit $vl, implicit $vtype :: (store unknown-size into %ir.pc, align 8)
42