1# RUN: llc -mtriple riscv64 -mattr=+experimental-v %s \ 2# RUN: -start-before=finalize-isel -stop-after=finalize-isel -o - \ 3# RUN: | FileCheck --check-prefix=POST-INSERTER %s 4 5# RUN: llc -mtriple riscv64 -mattr=+experimental-v %s \ 6# RUN: -start-before=finalize-isel -o - \ 7# RUN: | FileCheck --check-prefix=CODEGEN %s 8 9--- | 10 define void @vadd_vint64m1( 11 <vscale x 1 x i64> *%pc, 12 <vscale x 1 x i64> *%pa, 13 <vscale x 1 x i64> *%pb, 14 i64 %vl) 15 { 16 ret void 17 } 18... 19--- 20name: vadd_vint64m1 21tracksRegLiveness: true 22body: | 23 bb.0 (%ir-block.0): 24 liveins: $x10, $x11, $x12, $x13 25 26 %3:gpr = COPY $x13 27 %2:gpr = COPY $x12 28 %1:gpr = COPY $x11 29 %0:gpr = COPY $x10 30 %5:vr = IMPLICIT_DEF 31 %4:vr = PseudoVLE64_V_M1 %5, %1, $noreg, %3, 64, implicit $vl, implicit $vtype :: (load unknown-size from %ir.pa, align 8) 32 %7:vr = IMPLICIT_DEF 33 %6:vr = PseudoVLE64_V_M1 %7, %2, $noreg, %3, 64, implicit $vl, implicit $vtype :: (load unknown-size from %ir.pb, align 8) 34 %9:vr = IMPLICIT_DEF 35 %8:vr = PseudoVADD_VV_M1 %9, killed %4, killed %6, $noreg, %3, 64, implicit $vl, implicit $vtype 36 PseudoVSE64_V_M1 killed %8, %0, $noreg, %3, 64, implicit $vl, implicit $vtype :: (store unknown-size into %ir.pc, align 8) 37 PseudoRET 38 39... 40 41# POST-INSERTER: %0:gpr = COPY $x13 42# POST-INSERTER: %4:vr = IMPLICIT_DEF 43# POST-INSERTER: dead %10:gpr = PseudoVSETVLI %0, 12, implicit-def $vl, implicit-def $vtype 44# POST-INSERTER: %5:vr = PseudoVLE64_V_M1 %4, %2, $noreg, $noreg, -1, implicit $vl, implicit $vtype :: (load unknown-size from %ir.pa, align 8) 45# POST-INSERTER: %6:vr = IMPLICIT_DEF 46# POST-INSERTER: dead %11:gpr = PseudoVSETVLI %0, 12, implicit-def $vl, implicit-def $vtype 47# POST-INSERTER: %7:vr = PseudoVLE64_V_M1 %6, %1, $noreg, $noreg, -1, implicit $vl, implicit $vtype :: (load unknown-size from %ir.pb, align 8) 48# POST-INSERTER: %8:vr = IMPLICIT_DEF 49# POST-INSERTER: dead %12:gpr = PseudoVSETVLI %0, 12, implicit-def $vl, implicit-def $vtype 50# POST-INSERTER: %9:vr = PseudoVADD_VV_M1 %8, killed %5, killed %7, $noreg, $noreg, -1, implicit $vl, implicit $vtype 51# POST-INSERTER: dead %13:gpr = PseudoVSETVLI %0, 12, implicit-def $vl, implicit-def $vtype 52# POST-INSERTER: PseudoVSE64_V_M1 killed %9, %3, $noreg, $noreg, -1, implicit $vl, implicit $vtype :: (store unknown-size into %ir.pc, align 8) 53 54# CODEGEN: vsetvli a4, a3, e64,m1,tu,mu 55# CODEGEN-NEXT: vle64.v v25, (a1) 56# CODEGEN-NEXT: vsetvli a1, a3, e64,m1,tu,mu 57# CODEGEN-NEXT: vle64.v v26, (a2) 58# CODEGEN-NEXT: vsetvli a1, a3, e64,m1,tu,mu 59# CODEGEN-NEXT: vadd.vv v25, v25, v26 60# CODEGEN-NEXT: vsetvli a1, a3, e64,m1,tu,mu 61# CODEGEN-NEXT: vse64.v v25, (a0) 62# CODEGEN-NEXT: ret 63