1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -mtriple aarch64-apple-ios -run-pass regallocfast -o - %s | FileCheck %s
3 # RUN: llc -mtriple aarch64-apple-ios -passes=regallocfast -o - %s | FileCheck %s
4 # This test used to crash the fast register alloc.
5 # Basically, when a basic block has liveins, the fast regalloc
6 # was deferencing the begin iterator of this block. However,
7 # when this block is empty and it will just crashed!
10 tracksRegLiveness: true
12 ; CHECK-LABEL: name: crashing
14 ; CHECK: successors: %bb.1(0x80000000)
15 ; CHECK: liveins: $x0, $x1
17 ; CHECK: renamable $w0 = MOVi32imm -1
18 ; CHECK: RET_ReallyLR implicit killed $w0
23 %0:gpr32 = MOVi32imm -1
25 RET_ReallyLR implicit $w0