brintos

brintos / llvm-project-archived public Read only

0
0
Text · 3.5 KiB · 9fe555d Raw
124 lines · plain
1#RUN: llc -run-pass arm-cp-islands %s -o - | FileCheck %s2 3--- |4  ; ModuleID = 'test.ll'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"8  9  define void @Func(i32 %i, ptr nocapture %p) local_unnamed_addr {10  entry:11    switch i32 %i, label %sw.epilog [12      i32 0, label %sw.bb13      i32 1, label %sw.bb114      i32 2, label %sw.epilog.sink.split15      i32 4, label %sw.bb316    ]17  18  sw.bb:                                            ; preds = %entry19    br label %sw.epilog.sink.split20  21  sw.bb1:                                           ; preds = %entry22    store i32 0, ptr %p, align 423    br label %sw.epilog.sink.split24  25  sw.bb3:                                           ; preds = %entry26    br label %sw.epilog.sink.split27  28  sw.epilog.sink.split:                             ; preds = %sw.bb3, %sw.bb1, %sw.bb, %entry29    %.sink = phi i32 [ 2, %sw.bb3 ], [ 0, %sw.bb ], [ 1, %entry ], [ 1, %sw.bb1 ]30    store i32 %.sink, ptr %p, align 431    br label %sw.epilog32  33  sw.epilog:                                        ; preds = %sw.epilog.sink.split, %entry34    ret void35  }36 37...38---39name:            Func40alignment:       241exposesReturnsTwice: false42legalized:       false43regBankSelected: false44selected:        false45tracksRegLiveness: true46liveins:         47  - { reg: '$r0' }48  - { reg: '$r1' }49frameInfo:       50  isFrameAddressTaken: false51  isReturnAddressTaken: false52  hasStackMap:     false53  hasPatchPoint:   false54  stackSize:       055  offsetAdjustment: 056  maxAlignment:    057  adjustsStack:    false58  hasCalls:        false59  maxCallFrameSize: 060  hasOpaqueSPAdjustment: false61  hasVAStart:      false62  hasMustTailInVarArgFunc: false63jumpTable:       64  kind:            inline65  entries:         66    - id:              067      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 LEA70# CHECK-NOT: t2LEApcrelJT71# CHECK-NOT: t2ADDrs72# CHECK: tMOVi873# CHECK: t2TBB_JT74 75body:             |76  bb.0.entry:77    successors: %bb.6.sw.epilog(0x0ccccccb), %bb.1.entry(0x73333335)78    liveins: $r0, $r179  80    tCMPi8 $r0, 4, 14, $noreg, implicit-def $cpsr81    t2Bcc %bb.6.sw.epilog, 8, killed $cpsr82  83  bb.1.entry: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)85  liveins: $r0, $r186  87    $r2 = t2LEApcrelJT %jump-table.0, 14, $noreg88    $r3 = t2ADDrs killed $r2, $r0, 18, 14, $noreg, $noreg89    $r2, dead $cpsr = tMOVi8 1, 14, $noreg90    t2BR_JT killed $r3, killed $r0, %jump-table.091  92  bb.2.sw.bb:93    successors: %bb.5.sw.epilog.sink.split(0x80000000)94    liveins: $r195  96    $r2, dead $cpsr = tMOVi8 0, 14, $noreg97    t2B %bb.5.sw.epilog.sink.split, 14, $noreg98  99  bb.3.sw.bb1:100    successors: %bb.5.sw.epilog.sink.split(0x80000000)101    liveins: $r1102  103    $r0, dead $cpsr = tMOVi8 0, 14, $noreg104    $r2, dead $cpsr = tMOVi8 1, 14, $noreg105    tSTRi killed $r0, $r1, 0, 14, $noreg :: (store (s32) into %ir.p)106    t2B %bb.5.sw.epilog.sink.split, 14, $noreg107  108  bb.4.sw.bb3:109    successors: %bb.5.sw.epilog.sink.split(0x80000000)110    liveins: $r1111  112    $r2, dead $cpsr = tMOVi8 2, 14, $noreg113  114  bb.5.sw.epilog.sink.split:115    successors: %bb.6.sw.epilog(0x80000000)116    liveins: $r1, $r2117  118    tSTRi killed $r2, killed $r1, 0, 14, $noreg :: (store (s32) into %ir.p)119  120  bb.6.sw.epilog:121    tBX_RET 14, $noreg122 123...124