1# RUN: llc -mtriple=armv7-apple-ios -o - %s -run-pass if-converter | FileCheck %s 2--- 3name: f1 4body: | 5 bb.0: 6 successors: %bb.1 7 8 B %bb.1 9 10 bb.1: 11 successors: %bb.2, %bb.4 12 13 Bcc %bb.4, 1, $cpsr 14 15 bb.2: 16 successors: %bb.3, %bb.5 17 18 Bcc %bb.5, 1, $cpsr 19 20 bb.3: 21 successors: %bb.5 22 23 B %bb.5 24 25 bb.4: 26 successors: 27 28 bb.5: 29 successors: %bb.1, %bb.6 30 31 Bcc %bb.1, 1, $cpsr 32 33 bb.6: 34 BX_RET 14, _ 35 36... 37 38# IfConversion.cpp/canFallThroughTo thought there was a fallthrough from 39# bb.4 to bb5 even if the successor list was empty. 40# bb.4 is empty, so it surely looks like it can fallthrough, but this is what 41# happens for a bb just containing an "unreachable". 42 43#CHECK: body: | 44#CHECK: bb.0: 45#CHECK: successors: %bb.1 46 47#CHECK: bb.1: 48#CHECK: successors: %bb.3({{.*}}), %bb.2 49 50# The original brr_cond from bb.1, jumping to the empty bb 51#CHECK: Bcc %bb.2 52#CHECK: B %bb.3 53 54# Empty bb.2, originally containing "unreachable" and thus has no successors 55# and we cannot guess them: we should print an empty list of successors. 56#CHECK: bb.2: 57#CHECK: successors:{{ *$}} 58 59#CHECK: bb.3: 60#CHECK: successors: %bb.1 61 62# Conditional BX_RET and then loop back to bb.1 63#CHECK: BX_RET 0 64#CHECK: B %bb.1 65 66