• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2# RUN: llc -run-pass=arm-cp-islands %s -o -  | FileCheck %s
3
4# This test make sure that the constant pool does not keep in the middle of an IT block
5# when needs to split a block to place them.
6#
7
8--- |
9  ; ModuleID = '<stdin>'
10  source_filename = "<stdin>"
11  target datalayout = "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64"
12  target triple = "thumbv8m.main-arm-none-eabi"
13
14  %struct.e = type { double, double, double }
15
16  declare i32 @llvm.arm.space(i32, i32)
17
18  define hidden arm_aapcs_vfpcc %struct.e @h() {
19    unreachable
20  }
21
22...
23---
24name:            h
25alignment:       4
26exposesReturnsTwice: false
27legalized:       false
28regBankSelected: false
29selected:        false
30failedISel:      false
31tracksRegLiveness: true
32hasWinCFI:       false
33registers:       []
34liveins:         []
35frameInfo:
36  isFrameAddressTaken: false
37  isReturnAddressTaken: false
38  hasStackMap:     false
39  hasPatchPoint:   false
40  stackSize:       64
41  offsetAdjustment: -40
42  maxAlignment:    4
43  adjustsStack:    true
44  hasCalls:        true
45  maxCallFrameSize: 0
46  cvBytesOfCalleeSavedRegisters: 0
47  hasOpaqueSPAdjustment: false
48  hasVAStart:      false
49  hasMustTailInVarArgFunc: false
50  localFrameSize:  28
51  savePoint:       ''
52  restorePoint:    ''
53fixedStack:      []
54callSites:       []
55constants:
56  - id:              0
57    value:           'double 0.000000e+00'
58    alignment:       8
59    isTargetSpecific: false
60  - id:              1
61    value:           'double 7.020000e+02'
62    alignment:       8
63    isTargetSpecific: false
64  - id:              2
65    value:           'double 2.020000e+02'
66    alignment:       8
67    isTargetSpecific: false
68machineFunctionInfo: {}
69body:             |
70  ; CHECK-LABEL: name: h
71  ; CHECK: bb.0:
72  ; CHECK:   successors: %bb.4(0x80000000)
73  ; CHECK:   renamable $d0 = VLDRD %const.3, 0, 14 /* CC::al */, $noreg :: (load 8 from constant-pool)
74  ; CHECK:   dead renamable $r0 = SPACE 40, undef renamable $r0
75  ; CHECK:   tB %bb.4, 14 /* CC::al */, $noreg
76  ; CHECK: bb.1 (align 8):
77  ; CHECK:   successors:
78  ; CHECK:   CONSTPOOL_ENTRY 3, %const.0, 8
79  ; CHECK: bb.2:
80  ; CHECK:   successors:
81  ; CHECK: bb.3 (align 8):
82  ; CHECK:   successors:
83  ; CHECK:   CONSTPOOL_ENTRY 5, %const.2, 8
84  ; CHECK: bb.4 (align 2):
85  ; CHECK:   successors: %bb.5(0x80000000)
86  ; CHECK:   dead renamable $r0 = SPACE 790, undef renamable $r0
87  ; CHECK: bb.5:
88  ; CHECK:   successors: %bb.7(0x80000000)
89  ; CHECK:   renamable $r0 = t2MOVi 0, 14 /* CC::al */, $noreg, $noreg
90  ; CHECK:   t2CMPri $r0, 32, 14 /* CC::al */, $noreg, implicit-def $cpsr
91  ; CHECK:   renamable $r0 = SPACE 200, undef renamable $r0
92  ; CHECK:   t2IT 0, 1, implicit-def $itstate
93  ; CHECK:   renamable $d0 = VLDRD %const.7, 0, 0 /* CC::eq */, $cpsr, implicit $itstate :: (load 8 from constant-pool)
94  ; CHECK:   renamable $d1 = VLDRD %const.5, 0, 0 /* CC::eq */, $cpsr, implicit $itstate :: (load 8 from constant-pool)
95  ; CHECK:   renamable $d2 = VLDRD %const.6, 0, 0 /* CC::eq */, $cpsr, implicit $itstate :: (load 8 from constant-pool)
96  ; CHECK:   $r0 = t2SUBri $r0, 12, 0 /* CC::eq */, $cpsr, $noreg, implicit killed $itstate
97  ; CHECK:   t2B %bb.7, 14 /* CC::al */, $noreg
98  ; CHECK: bb.6 (align 8):
99  ; CHECK:   successors:
100  ; CHECK:   CONSTPOOL_ENTRY 7, %const.1, 8
101  ; CHECK: bb.7 (align 2):
102  ; CHECK:   liveins: $r0, $cpsr, $d0, $s0, $s1, $d1, $s2, $s3, $d2, $s4, $s5
103  ; CHECK:   t2IT 0, 4, implicit-def $itstate
104  ; CHECK:   $sp = tMOVr $r0, 0 /* CC::eq */, $cpsr, implicit $itstate
105  ; CHECK:   $sp = t2LDMIA_RET $sp, 0 /* CC::eq */, killed $cpsr, def $r4, def $r5, def $r6, def $r7, def $r8, def $r9, def $r10, def $r11, def $pc, implicit killed $d0, implicit killed $d1, implicit killed $d2, implicit $sp, implicit killed $itstate
106  ; CHECK: bb.8 (align 8):
107  ; CHECK:   successors:
108  ; CHECK:   CONSTPOOL_ENTRY 6, %const.0, 8
109  ; CHECK: bb.9 (align 2):
110  ; CHECK:   successors: %bb.9(0x80000000)
111  ; CHECK:   dead renamable $r0 = SPACE 4000, undef renamable $r0
112  ; CHECK:   t2B %bb.9, 14 /* CC::al */, $noreg
113  ; CHECK: bb.10:
114  bb.0:
115    successors: %bb.1(0x80000000)
116
117    renamable $d0 = VLDRD %const.0, 0, 14, $noreg :: (load 8 from constant-pool)
118    dead renamable $r0 = SPACE 40, undef renamable $r0
119
120  bb.1:
121    successors: %bb.2(0x80000000)
122
123    dead renamable $r0 = SPACE 790, undef renamable $r0
124
125  bb.2:
126    successors:
127
128    renamable $r0 = t2MOVi 0, 14, _, _
129    t2CMPri $r0, 32, 14, $noreg, implicit-def $cpsr
130    renamable $r0 = SPACE 200, undef renamable $r0
131    t2IT 0, 1, implicit-def $itstate
132    renamable $d0 = VLDRD %const.1, 0, 0, $cpsr, implicit $itstate :: (load 8 from constant-pool)
133    renamable $d1 = VLDRD %const.2, 0, 0, $cpsr, implicit $itstate :: (load 8 from constant-pool)
134    renamable $d2 = VLDRD %const.0, 0, 0, $cpsr, implicit $itstate :: (load 8 from constant-pool)
135    $r0 = t2SUBri $r0, 12, 0, $cpsr, $noreg, implicit killed $itstate
136    t2IT 0, 4, implicit-def $itstate
137    $sp = tMOVr $r0, 0, $cpsr, implicit $itstate
138    $sp = t2LDMIA_RET $sp, 0, killed $cpsr, def $r4, def $r5, def $r6, def $r7, def $r8, def $r9, def $r10, def $r11, def $pc, implicit killed $d0, implicit killed $d1, implicit killed $d2, implicit $sp, implicit killed $itstate
139
140  bb.3:
141    successors: %bb.3(0x80000000)
142
143    dead renamable $r0 = SPACE 4000, undef renamable $r0
144    t2B %bb.3, 14, $noreg
145
146