1# RUN: llc -mtriple=aarch64-linux-gnu -verify-machineinstrs -o /dev/null %s \
2# RUN:   -run-pass=livevars,phi-node-elimination,twoaddressinstruction \
3# RUN:   -no-phi-elim-live-out-early-exit=1 -phi-elim-split-all-critical-edges=1
4
5# Used to result in
6#
7#     *** Bad machine code: LiveVariables: Block should not be in AliveBlocks ***
8#
9# Just verify that we do not crash (or get verifier error).
10
11---
12name: test
13tracksRegLiveness: true
14body: |
15  bb.0:
16    liveins: $nzcv, $wzr
17    Bcc 8, %bb.2, implicit $nzcv
18
19  bb.1:
20    %x:gpr32 = COPY $wzr
21
22  bb.2:
23    %y:gpr32 = PHI %x:gpr32, %bb.1, undef %undef:gpr32, %bb.0
24    $wzr = COPY %y:gpr32
25...
26