1 #RUN: llc -run-pass arm-cp-islands %s -o - | FileCheck %s
5 source_filename = "test.c"
6 target datalayout = "e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64"
7 target triple = "thumbv8r-arm-none-eabi"
9 define void @Func(i32 %i, i32* nocapture %p) local_unnamed_addr {
11 switch i32 %i, label %sw.epilog [
14 i32 2, label %sw.epilog.sink.split
18 sw.bb: ; preds = %entry
19 br label %sw.epilog.sink.split
21 sw.bb1: ; preds = %entry
22 store i32 0, i32* %p, align 4
23 br label %sw.epilog.sink.split
25 sw.bb3: ; preds = %entry
26 br label %sw.epilog.sink.split
28 sw.epilog.sink.split: ; preds = %sw.bb3, %sw.bb1, %sw.bb, %entry
29 %.sink = phi i32 [ 2, %sw.bb3 ], [ 0, %sw.bb ], [ 1, %entry ], [ 1, %sw.bb1 ]
30 store i32 %.sink, i32* %p, align 4
33 sw.epilog: ; preds = %sw.epilog.sink.split, %entry
41 exposesReturnsTwice: false
43 regBankSelected: false
45 tracksRegLiveness: true
50 isFrameAddressTaken: false
51 isReturnAddressTaken: false
60 hasOpaqueSPAdjustment: false
62 hasMustTailInVarArgFunc: false
67 blocks: [ '%bb.2.sw.bb', '%bb.3.sw.bb1', '%bb.5.sw.epilog.sink.split',
68 '%bb.6.sw.epilog', '%bb.4.sw.bb3' ]
69 # The ADD should be deleted along with the LEA
70 # CHECK-NOT: t2LEApcrelJT
77 successors: %bb.6.sw.epilog(0x0ccccccb), %bb.1.entry(0x73333335)
80 tCMPi8 $r0, 4, 14, $noreg, implicit-def $cpsr
81 t2Bcc %bb.6.sw.epilog, 8, killed $cpsr
84 successors: %bb.2.sw.bb(0x1c71c71c), %bb.3.sw.bb1(0x1c71c71c), %bb.5.sw.epilog.sink.split(0x1c71c71c), %bb.6.sw.epilog(0x0e38e38e), %bb.4.sw.bb3(0x1c71c71c)
87 $r2 = t2LEApcrelJT %jump-table.0, 14, $noreg
88 $r3 = t2ADDrs killed $r2, $r0, 18, 14, $noreg, $noreg
89 $r2, dead $cpsr = tMOVi8 1, 14, $noreg
90 t2BR_JT killed $r3, killed $r0, %jump-table.0
93 successors: %bb.5.sw.epilog.sink.split(0x80000000)
96 $r2, dead $cpsr = tMOVi8 0, 14, $noreg
97 t2B %bb.5.sw.epilog.sink.split, 14, $noreg
100 successors: %bb.5.sw.epilog.sink.split(0x80000000)
103 $r0, dead $cpsr = tMOVi8 0, 14, $noreg
104 $r2, dead $cpsr = tMOVi8 1, 14, $noreg
105 tSTRi killed $r0, $r1, 0, 14, $noreg :: (store 4 into %ir.p)
106 t2B %bb.5.sw.epilog.sink.split, 14, $noreg
109 successors: %bb.5.sw.epilog.sink.split(0x80000000)
112 $r2, dead $cpsr = tMOVi8 2, 14, $noreg
114 bb.5.sw.epilog.sink.split:
115 successors: %bb.6.sw.epilog(0x80000000)
118 tSTRi killed $r2, killed $r1, 0, 14, $noreg :: (store 4 into %ir.p)