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)
27 ; CHECK-NEXT: successors: %bb.3(0x80000000)
29 ; CHECK-NEXT: [[ADDWri:%[0-9]+]]:gpr32sp = ADDWri [[COPY]], 2, 0
32 ; CHECK-NEXT: [[PHI:%[0-9]+]]:gpr32 = PHI [[ADDWri]], %bb.2
33 ; CHECK-NEXT: $w0 = COPY [[PHI]]
34 ; CHECK-NEXT: RET_ReallyLR implicit $w0
39 %0:gpr(s32) = COPY $w0
40 %1:gpr(s32) = G_CONSTANT i32 0
41 %3:gpr(s32) = G_CONSTANT i32 1
42 %5:gpr(s32) = G_CONSTANT i32 2
46 ; This block is unreachable.
47 %unreachable_inst:gpr(s32) = G_XOR %1, %3
48 $w0 = COPY %unreachable_inst(s32)
51 successors: %bb.4(0x80000000)
53 %6:gpr(s32) = G_ADD %0, %5
56 %7:gpr(s32) = G_PHI %6(s32), %bb.3
58 RET_ReallyLR implicit $w0