1 ; RUN: llc -mtriple x86_64-- -stop-before peephole-opt -o %t.mir %s
2 ; RUN: llc -mtriple x86_64-- -run-pass none %t.mir -verify-machineinstrs -o - | FileCheck %s
4 ; Unreachable blocks in the machine instr representation are these
5 ; weird empty blocks with no successors.
6 ; The MIR printer used to not print empty lists of successors. However,
7 ; the MIR parser now treats non-printed list of successors as "please
8 ; guess it for me". As a result, the parser tries to guess the list of
9 ; successors and given the block is empty, just assumes it falls through
12 ; The following test case used to fail the verifier because the false
13 ; path ended up falling through split.true and now, the definition of
14 ; %v does not dominate all its uses.
15 ; Indeed, we go from the following CFG:
26 ; | / <-- invalid edge
29 ; Because of the invalid edge, we get the "def does not
30 ; dominate all uses" error.
32 ; CHECK-LABEL: name: foo
33 ; CHECK-LABEL: bb.{{[0-9]+}}.false:
34 ; CHECK-NEXT: successors:
35 ; CHECK-NOT: %bb.{{[0-9]+}}.split.true
36 ; CHECK-LABEL: bb.{{[0-9]+}}.split.true:
37 define void @foo(i32* %bar) {
38 br i1 undef, label %true, label %false
40 %v = load i32, i32* %bar
46 store i32 %vInc, i32* %bar