1 # RUN: llc -mtriple=arm-apple-ios -run-pass=if-converter %s -o - | FileCheck %s
3 declare void @__stack_chk_fail()
23 tBL 14, $cpsr, @__stack_chk_fail
27 $sp = tADDspi $sp, 2, 14, _
28 $sp = tADDspi $sp, 2, 14, _
29 tTAILJMPdND @bar, 14, $cpsr
32 # bb.2 has no successors, presumably because __stack_chk_fail doesn't return,
33 # so there should be no edge from bb.2 to bb.3.
34 # Nevertheless, IfConversion treats bb.1, bb.2, bb.3 as a triangle and
35 # inserts a predicated copy of bb.2 in bb.1.
37 # This caused r302876 to die with a failed assertion.
40 # CHECK: successors: %bb.2(0x40000000), %bb.1(0x40000000)
41 # CHECK: Bcc %bb.2, 1, $cpsr
44 # CHECK-NOT: successors: %bb
45 # CHECK: tBL 14, $cpsr, @__stack_chk_fail
48 # CHECK-NOT: successors: %bb
49 # CHECK: tBL 1, $cpsr, @__stack_chk_fail
50 # CHECK: $sp = tADDspi $sp, 2, 14, $noreg
51 # CHECK: $sp = tADDspi $sp, 2, 14, $noreg
52 # CHECK: tTAILJMPdND @bar, 14, $cpsr