brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.4 KiB · 005b433 Raw
52 lines · plain
1# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py2# RUN: llc -mtriple=thumb-apple-ios -run-pass=if-converter %s -o - | FileCheck %s3 4# bb.2 has no successors, presumably because __stack_chk_fail doesn't return,5# so there should be no edge from bb.2 to bb.3.6# Nevertheless, IfConversion treats bb.1, bb.2, bb.3 as a triangle and7# inserts a predicated copy of bb.2 in bb.1.8 9# This caused r302876 to die with a failed assertion.10 11--- |12  declare void @__stack_chk_fail()13  declare void @bar()14 15  define void @foo() {16    ret void17  }18...19---20name:            foo21body:             |22  ; CHECK-LABEL: name: foo23  ; CHECK: bb.0:24  ; CHECK:   successors: %bb.2(0x40000000), %bb.1(0x40000000)25  ; CHECK:   tBcc %bb.2, 1 /* CC::ne */, $cpsr26  ; CHECK: bb.1:27  ; CHECK:   successors:28  ; CHECK:   tBL 14 /* CC::al */, $cpsr, @__stack_chk_fail29  ; CHECK: bb.2:30  ; CHECK:   tBL 1 /* CC::ne */, $cpsr, @__stack_chk_fail31  ; CHECK:   $sp = tADDspi $sp, 2, 14 /* CC::al */, $noreg32  ; CHECK:   $sp = tADDspi $sp, 2, 14 /* CC::al */, $noreg33  ; CHECK:   tTAILJMPdND @bar, 14 /* CC::al */, $cpsr34 35  bb.0:36    tBcc %bb.1, 1, $cpsr37    tB %bb.2, 14, $noreg38 39  bb.1:40    tBcc %bb.3, 0, $cpsr41 42  bb.2:43  successors:44    tBL 14, $cpsr, @__stack_chk_fail45 46  bb.3:47  successors:48    $sp = tADDspi $sp, 2, 14, _49    $sp = tADDspi $sp, 2, 14, _50    tTAILJMPdND @bar, 14, $cpsr51...52