| # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py UTC_ARGS: --version 5 |
| # RUN: llc %s -o - -mtriple=riscv64 -mattr=+v -run-pass=riscv-vmv0-elimination -verify-machineinstrs | FileCheck %s |
| |
| # If we peek through a COPY to vmv0, we may leave it dead. Make sure we delete |
| # it so the register allocator doesn't try to allocate it, which can lead to a |
| # regalloc error. |
| # https://github.com/llvm/llvm-project/pull/126850#issuecomment-2685166388 |
| |
| --- |
| name: dead_copy |
| body: | |
| bb.0: |
| liveins: $v8 |
| ; CHECK-LABEL: name: dead_copy |
| ; CHECK: liveins: $v8 |
| ; CHECK-NEXT: {{ $}} |
| ; CHECK-NEXT: %x:vr = COPY $v8 |
| ; CHECK-NEXT: $v0 = COPY %x |
| ; CHECK-NEXT: PseudoVSE8_V_M1_MASK $noreg, $noreg, $v0, -1, 3 /* e8 */ |
| %x:vr = COPY $v8 |
| %y:vmv0 = COPY %x:vr |
| PseudoVSE8_V_M1_MASK $noreg, $noreg, %y:vmv0, -1, 3 |