1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -mtriple=aarch64-unknown-unknown -o - -verify-machineinstrs -run-pass=instruction-select %s | FileCheck %s
4 name: test_unreachable_delete
6 exposesReturnsTwice: false
10 tracksRegLiveness: true
13 ; CHECK-LABEL: name: test_unreachable_delete
15 ; CHECK-NEXT: successors: %bb.2(0x80000000)
16 ; CHECK-NEXT: liveins: $w0
18 ; CHECK-NEXT: [[COPY:%[0-9]+]]:gpr32sp = COPY $w0
19 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:gpr32 = COPY $wzr
20 ; CHECK-NEXT: [[MOVi32imm:%[0-9]+]]:gpr32 = MOVi32imm 1
24 ; CHECK-NEXT: successors: %bb.2(0x80000000)
28 ; CHECK-NEXT: successors: %bb.3(0x80000000)
30 ; CHECK-NEXT: [[ADDWri:%[0-9]+]]:gpr32sp = ADDWri [[COPY]], 2, 0
33 ; CHECK-NEXT: [[PHI:%[0-9]+]]:gpr32 = PHI [[ADDWri]], %bb.2
34 ; CHECK-NEXT: $w0 = COPY [[PHI]]
35 ; CHECK-NEXT: RET_ReallyLR implicit $w0
40 %0:gpr(s32) = COPY $w0
41 %1:gpr(s32) = G_CONSTANT i32 0
42 %3:gpr(s32) = G_CONSTANT i32 1
43 %5:gpr(s32) = G_CONSTANT i32 2
47 ; This block is unreachable.
48 %unreachable_inst:gpr(s32) = G_XOR %1, %3
49 $w0 = COPY %unreachable_inst(s32)
52 successors: %bb.4(0x80000000)
54 %6:gpr(s32) = G_ADD %0, %5
57 %7:gpr(s32) = G_PHI %6(s32), %bb.3
59 RET_ReallyLR implicit $w0