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 # This test used to crash the fast register alloc.
4 # Basically, when a basic block has liveins, the fast regalloc
5 # was deferencing the begin iterator of this block. However,
6 # when this block is empty and it will just crashed!
9 tracksRegLiveness: true
11 ; CHECK-LABEL: name: crashing
13 ; CHECK: successors: %bb.1(0x80000000)
14 ; CHECK: liveins: $x0, $x1
16 ; CHECK: renamable $w0 = MOVi32imm -1
17 ; CHECK: RET_ReallyLR implicit killed $w0
22 %0:gpr32 = MOVi32imm -1
24 RET_ReallyLR implicit $w0