# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py # RUN: llc %s -o - -mtriple=riscv64 -mattr=v,xsfmm32a32f -run-pass=liveintervals,riscv-insert-vsetvli \ # RUN: -verify-machineinstrs | FileCheck %s --- | define void @fooTK() { ret void } define void @fooTM() { ret void } define void @TMTKsameBB() { ret void } define void @TMTKdifferentBB() { ret void } define void @TMTKsameBBremoved() { ret void } define void @TMTKButDisableTWiden() { ret void } ... --- name: fooTK tracksRegLiveness: true body: | bb.0: liveins: $v8m8, $v16m8, $t0 ; CHECK-LABEL: name: fooTK ; CHECK: liveins: $v8m8, $v16m8, $t0 ; CHECK-NEXT: {{ $}} ; CHECK-NEXT: [[COPY:%[0-9]+]]:gpr = COPY $x0 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:gprnox0 = COPY $x0 ; CHECK-NEXT: dead [[PseudoSF_VSETTNTX0_:%[0-9]+]]:gprnox0 = PseudoSF_VSETTNTX0 killed $x0, 1032 /* e16, w2 */, implicit-def $vl, implicit-def $vtype ; CHECK-NEXT: [[PseudoSF_VSETTK:%[0-9]+]]:gprnox0 = PseudoSF_VSETTK [[COPY]], 4 /* e16 */, 2 /* w2 */, implicit-def dead $vtype, implicit $vtype, implicit $vtype, implicit $vtype ; CHECK-NEXT: dead $x0 = PseudoSF_VSETTNT [[COPY1]], 1032 /* e16, w2 */, implicit-def $vl, implicit-def $vtype ; CHECK-NEXT: dead $x0 = PseudoSF_VSETTM [[COPY1]], 4 /* e16 */, 2 /* w2 */, implicit-def $vtype, implicit $vtype ; CHECK-NEXT: dead $x0 = PseudoSF_VSETTK [[PseudoSF_VSETTK]], 4 /* e16 */, 2 /* w2 */, implicit-def $vtype, implicit $vtype ; CHECK-NEXT: PseudoSF_MM_F_F $t0, renamable $v8m8, renamable $v16m8, 7 /* frm=dyn */, $noreg, $noreg, $noreg, 4 /* e16 */, 2 /* w2 */, implicit $frm, implicit $vl, implicit $vtype, implicit $vl, implicit $vtype ; CHECK-NEXT: PseudoRET implicit [[PseudoSF_VSETTK]] %1:gpr = COPY $x0 %2:gprnox0 = COPY $x0 %0:gprnox0 = PseudoSF_VSETTK %1:gpr, 4, 2, implicit-def dead $vtype, implicit $vtype, implicit $vtype PseudoSF_MM_F_F $t0, killed renamable $v8m8, killed renamable $v16m8, 7, %2:gprnox0, %2:gprnox0, %0:gprnox0, 4, 2, implicit $frm, implicit $vl, implicit $vtype PseudoRET implicit %0:gprnox0 ... --- name: fooTM tracksRegLiveness: true body: | bb.0: liveins: $v8m8, $v16m8, $t0 ; CHECK-LABEL: name: fooTM ; CHECK: liveins: $v8m8, $v16m8, $t0 ; CHECK-NEXT: {{ $}} ; CHECK-NEXT: [[COPY:%[0-9]+]]:gpr = COPY $x0 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:gprnox0 = COPY $x0 ; CHECK-NEXT: dead [[PseudoSF_VSETTNTX0_:%[0-9]+]]:gprnox0 = PseudoSF_VSETTNTX0 killed $x0, 1032 /* e16, w2 */, implicit-def $vl, implicit-def $vtype ; CHECK-NEXT: [[PseudoSF_VSETTM:%[0-9]+]]:gprnox0 = PseudoSF_VSETTM [[COPY]], 4 /* e16 */, 2 /* w2 */, implicit-def dead $vtype, implicit $vtype, implicit $vtype, implicit $vtype ; CHECK-NEXT: dead $x0 = PseudoSF_VSETTNT [[PseudoSF_VSETTM]], 1032 /* e16, w2 */, implicit-def $vl, implicit-def $vtype ; CHECK-NEXT: dead $x0 = PseudoSF_VSETTM [[PseudoSF_VSETTM]], 4 /* e16 */, 2 /* w2 */, implicit-def $vtype, implicit $vtype ; CHECK-NEXT: dead $x0 = PseudoSF_VSETTK [[COPY1]], 4 /* e16 */, 2 /* w2 */, implicit-def $vtype, implicit $vtype ; CHECK-NEXT: PseudoSF_MM_F_F $t0, renamable $v8m8, renamable $v16m8, 7 /* frm=dyn */, $noreg, $noreg, $noreg, 4 /* e16 */, 2 /* w2 */, implicit $frm, implicit $vl, implicit $vtype, implicit $vl, implicit $vtype ; CHECK-NEXT: PseudoRET implicit [[PseudoSF_VSETTM]] %1:gpr = COPY $x0 %2:gprnox0 = COPY $x0 %0:gprnox0 = PseudoSF_VSETTM %1:gpr, 4, 2, implicit-def dead $vtype, implicit $vtype, implicit $vtype PseudoSF_MM_F_F $t0, killed renamable $v8m8, killed renamable $v16m8, 7, %0:gprnox0, %0:gprnox0, %2:gprnox0, 4, 2, implicit $frm, implicit $vl, implicit $vtype PseudoRET implicit %0:gprnox0 ... --- name: TMTKsameBB tracksRegLiveness: true body: | bb.0: liveins: $v8m8, $v16m8, $t0 ; CHECK-LABEL: name: TMTKsameBB ; CHECK: liveins: $v8m8, $v16m8, $t0 ; CHECK-NEXT: {{ $}} ; CHECK-NEXT: [[COPY:%[0-9]+]]:gprnox0 = COPY $x0 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:gprnox0 = COPY $x0 ; CHECK-NEXT: dead $x0 = PseudoSF_VSETTNT [[COPY1]], 1032 /* e16, w2 */, implicit-def $vl, implicit-def $vtype ; CHECK-NEXT: dead $x0 = PseudoSF_VSETTM [[COPY1]], 4 /* e16 */, 2 /* w2 */, implicit-def $vtype, implicit $vtype ; CHECK-NEXT: dead $x0 = PseudoSF_VSETTK [[COPY]], 4 /* e16 */, 2 /* w2 */, implicit-def $vtype, implicit $vtype ; CHECK-NEXT: PseudoSF_MM_F_F $t0, $v8m8, $v16m8, 7 /* frm=dyn */, $noreg, $noreg, $noreg, 4 /* e16 */, 2 /* w2 */, implicit $frm, implicit $vl, implicit $vtype, implicit $vl, implicit $vtype ; CHECK-NEXT: dead $x0 = PseudoSF_VSETTK [[COPY1]], 4 /* e16 */, 2 /* w2 */, implicit-def $vtype, implicit $vtype, implicit $vtype ; CHECK-NEXT: dead $x0 = PseudoSF_VSETTM [[COPY1]], 4 /* e16 */, 2 /* w2 */, implicit-def $vtype, implicit $vtype ; CHECK-NEXT: dead $x0 = PseudoSF_VSETTK [[COPY]], 4 /* e16 */, 2 /* w2 */, implicit-def $vtype, implicit $vtype ; CHECK-NEXT: PseudoSF_MM_F_F $t0, renamable $v8m8, renamable $v16m8, 7 /* frm=dyn */, $noreg, $noreg, $noreg, 4 /* e16 */, 2 /* w2 */, implicit $frm, implicit $vl, implicit $vtype, implicit $vl, implicit $vtype %0:gprnox0 = COPY $x0 %2:gprnox0 = COPY $x0 PseudoSF_MM_F_F $t0, $v8m8, $v16m8, 7, %2:gprnox0, %2:gprnox0, %0:gprnox0, 4, 2, implicit $frm, implicit $vl, implicit $vtype dead $x0 = PseudoSF_VSETTK %2:gprnox0, 4, 2, implicit-def $vtype, implicit $vtype PseudoSF_MM_F_F $t0, killed renamable $v8m8, killed renamable $v16m8, 7, %2:gprnox0, %2:gprnox0, %0:gprnox0, 4, 2, implicit $frm, implicit $vl, implicit $vtype ... --- name: TMTKdifferentBB tracksRegLiveness: true body: | ; CHECK-LABEL: name: TMTKdifferentBB ; CHECK: bb.0: ; CHECK-NEXT: successors: %bb.1(0x80000000) ; CHECK-NEXT: liveins: $v8m8, $v16m8, $t0 ; CHECK-NEXT: {{ $}} ; CHECK-NEXT: [[COPY:%[0-9]+]]:gprnox0 = COPY $x0 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:gprnox0 = COPY $x0 ; CHECK-NEXT: dead $x0 = PseudoSF_VSETTNT [[COPY1]], 1032 /* e16, w2 */, implicit-def $vl, implicit-def $vtype ; CHECK-NEXT: dead $x0 = PseudoSF_VSETTM [[COPY1]], 4 /* e16 */, 2 /* w2 */, implicit-def $vtype, implicit $vtype ; CHECK-NEXT: dead $x0 = PseudoSF_VSETTK [[COPY]], 4 /* e16 */, 2 /* w2 */, implicit-def $vtype, implicit $vtype ; CHECK-NEXT: PseudoSF_MM_F_F $t0, $v8m8, $v16m8, 7 /* frm=dyn */, $noreg, $noreg, $noreg, 4 /* e16 */, 2 /* w2 */, implicit $frm, implicit $vl, implicit $vtype, implicit $vl, implicit $vtype ; CHECK-NEXT: dead $x0 = PseudoSF_VSETTK [[COPY1]], 4 /* e16 */, 2 /* w2 */, implicit-def $vtype, implicit $vtype, implicit $vtype ; CHECK-NEXT: {{ $}} ; CHECK-NEXT: bb.1: ; CHECK-NEXT: liveins: $v8m8, $v16m8, $t0 ; CHECK-NEXT: {{ $}} ; CHECK-NEXT: dead $x0 = PseudoSF_VSETTM [[COPY1]], 4 /* e16 */, 2 /* w2 */, implicit-def $vtype, implicit $vtype ; CHECK-NEXT: dead $x0 = PseudoSF_VSETTK [[COPY]], 4 /* e16 */, 2 /* w2 */, implicit-def $vtype, implicit $vtype ; CHECK-NEXT: PseudoSF_MM_F_F $t0, renamable $v8m8, renamable $v16m8, 7 /* frm=dyn */, $noreg, $noreg, $noreg, 4 /* e16 */, 2 /* w2 */, implicit $frm, implicit $vl, implicit $vtype, implicit $vl, implicit $vtype bb.0: liveins: $v8m8, $v16m8, $t0 %0:gprnox0 = COPY $x0 %2:gprnox0 = COPY $x0 PseudoSF_MM_F_F $t0, $v8m8, $v16m8, 7, %2:gprnox0, %2:gprnox0, %0:gprnox0, 4, 2, implicit $frm, implicit $vl, implicit $vtype dead $x0 = PseudoSF_VSETTK %2:gprnox0, 4, 2, implicit-def $vtype, implicit $vtype bb.1: liveins: $v8m8, $v16m8, $t0 PseudoSF_MM_F_F $t0, killed renamable $v8m8, killed renamable $v16m8, 7, %2:gprnox0, %2:gprnox0, %0:gprnox0, 4, 2, implicit $frm, implicit $vl, implicit $vtype ... --- name: TMTKsameBBremoved tracksRegLiveness: true body: | bb.0: liveins: $v8m8, $v16m8, $t0 ; CHECK-LABEL: name: TMTKsameBBremoved ; CHECK: liveins: $v8m8, $v16m8, $t0 ; CHECK-NEXT: {{ $}} ; CHECK-NEXT: [[COPY:%[0-9]+]]:gprnox0 = COPY $x0 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:gprnox0 = COPY $x0 ; CHECK-NEXT: dead $x0 = PseudoSF_VSETTNT [[COPY1]], 1032 /* e16, w2 */, implicit-def $vl, implicit-def $vtype ; CHECK-NEXT: dead $x0 = PseudoSF_VSETTM [[COPY1]], 4 /* e16 */, 2 /* w2 */, implicit-def $vtype, implicit $vtype ; CHECK-NEXT: dead $x0 = PseudoSF_VSETTK [[COPY]], 4 /* e16 */, 2 /* w2 */, implicit-def $vtype, implicit $vtype ; CHECK-NEXT: PseudoSF_MM_F_F $t0, $v8m8, $v16m8, 7 /* frm=dyn */, $noreg, $noreg, $noreg, 4 /* e16 */, 2 /* w2 */, implicit $frm, implicit $vl, implicit $vtype, implicit $vl, implicit $vtype ; CHECK-NEXT: dead $x0 = PseudoSF_VSETTM [[COPY1]], 4 /* e16 */, 2 /* w2 */, implicit-def $vtype, implicit $vtype ; CHECK-NEXT: dead $x0 = PseudoSF_VSETTK [[COPY]], 4 /* e16 */, 2 /* w2 */, implicit-def $vtype, implicit $vtype ; CHECK-NEXT: PseudoSF_MM_F_F $t0, renamable $v8m8, renamable $v16m8, 7 /* frm=dyn */, $noreg, $noreg, $noreg, 4 /* e16 */, 2 /* w2 */, implicit $frm, implicit $vl, implicit $vtype, implicit $vl, implicit $vtype %0:gprnox0 = COPY $x0 %2:gprnox0 = COPY $x0 PseudoSF_MM_F_F $t0, $v8m8, $v16m8, 7, %2:gprnox0, %2:gprnox0, %0:gprnox0, 4, 2, implicit $frm, implicit $vl, implicit $vtype PseudoSF_MM_F_F $t0, killed renamable $v8m8, killed renamable $v16m8, 7, %2:gprnox0, %2:gprnox0, %0:gprnox0, 4, 2, implicit $frm, implicit $vl, implicit $vtype ... --- name: TMTKButDisableTWiden tracksRegLiveness: true body: | bb.0: liveins: $v8m8, $v16m8, $t0, $x10, $x11 ; CHECK-LABEL: name: TMTKButDisableTWiden ; CHECK: liveins: $v8m8, $v16m8, $t0, $x10, $x11 ; CHECK-NEXT: {{ $}} ; CHECK-NEXT: [[COPY:%[0-9]+]]:gprnox0 = COPY $x0 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:gprnox0 = COPY $x0 ; CHECK-NEXT: dead $x0 = PseudoSF_VSETTNT [[COPY1]], 1032 /* e16, w2 */, implicit-def $vl, implicit-def $vtype ; CHECK-NEXT: dead $x0 = PseudoSF_VSETTM [[COPY1]], 4 /* e16 */, 2 /* w2 */, implicit-def $vtype, implicit $vtype ; CHECK-NEXT: dead $x0 = PseudoSF_VSETTK [[COPY]], 4 /* e16 */, 2 /* w2 */, implicit-def $vtype, implicit $vtype ; CHECK-NEXT: PseudoSF_MM_F_F $t0, $v8m8, $v16m8, 7 /* frm=dyn */, $noreg, $noreg, $noreg, 4 /* e16 */, 2 /* w2 */, implicit $frm, implicit $vl, implicit $vtype, implicit $vl, implicit $vtype ; CHECK-NEXT: dead $x0 = PseudoSF_VSETTK [[COPY1]], 4 /* e16 */, 2 /* w2 */, implicit-def $vtype, implicit $vtype, implicit $vtype ; CHECK-NEXT: [[COPY2:%[0-9]+]]:gpr = COPY $x11 ; CHECK-NEXT: [[COPY3:%[0-9]+]]:gpr = COPY $x10 ; CHECK-NEXT: dead $x0 = PseudoVSETIVLI 2, 216 /* e64, m1, ta, ma */, implicit-def $vl, implicit-def $vtype ; CHECK-NEXT: [[PseudoVLE64_V_M1_:%[0-9]+]]:vr = PseudoVLE64_V_M1 undef $noreg, [[COPY2]], 2 /* vl */, 6 /* e64 */, 0 /* tu, mu */, implicit $vl, implicit $vtype ; CHECK-NEXT: [[PseudoVLE64_V_M1_1:%[0-9]+]]:vr = PseudoVLE64_V_M1 undef $noreg, [[COPY3]], 2 /* vl */, 6 /* e64 */, 0 /* tu, mu */, implicit $vl, implicit $vtype ; CHECK-NEXT: dead [[PseudoVADD_VV_M1_:%[0-9]+]]:vr = PseudoVADD_VV_M1 undef $noreg, [[PseudoVLE64_V_M1_]], [[PseudoVLE64_V_M1_1]], 2 /* vl */, 6 /* e64 */, 0 /* tu, mu */, implicit $vl, implicit $vtype ; CHECK-NEXT: dead $x0 = PseudoSF_VSETTNT [[COPY1]], 1032 /* e16, w2 */, implicit-def $vl, implicit-def $vtype ; CHECK-NEXT: dead $x0 = PseudoSF_VSETTM [[COPY1]], 4 /* e16 */, 2 /* w2 */, implicit-def $vtype, implicit $vtype ; CHECK-NEXT: dead $x0 = PseudoSF_VSETTK [[COPY]], 4 /* e16 */, 2 /* w2 */, implicit-def $vtype, implicit $vtype ; CHECK-NEXT: PseudoSF_MM_F_F $t0, renamable $v8m8, renamable $v16m8, 7 /* frm=dyn */, $noreg, $noreg, $noreg, 4 /* e16 */, 2 /* w2 */, implicit $frm, implicit $vl, implicit $vtype, implicit $vl, implicit $vtype %0:gprnox0 = COPY $x0 %2:gprnox0 = COPY $x0 PseudoSF_MM_F_F $t0, $v8m8, $v16m8, 7, %2:gprnox0, %2:gprnox0, %0:gprnox0, 4, 2, implicit $frm, implicit $vl, implicit $vtype dead $x0 = PseudoSF_VSETTK %2:gprnox0, 4, 2, implicit-def $vtype, implicit $vtype %3:gpr = COPY $x11 %4:gpr = COPY $x10 %5:vr = PseudoVLE64_V_M1 undef $noreg, %3, 2, 6, 0 %6:vr = PseudoVLE64_V_M1 undef $noreg, %4, 2, 6, 0 %7:vr = PseudoVADD_VV_M1 undef $noreg, killed %5, killed %6, 2, 6, 0 PseudoSF_MM_F_F $t0, killed renamable $v8m8, killed renamable $v16m8, 7, %2:gprnox0, %2:gprnox0, %0:gprnox0, 4, 2, implicit $frm, implicit $vl, implicit $vtype ...