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
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.
9 source_filename = "<stdin>"
10 target datalayout = "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64"
11 target triple = "thumbv8m.main-arm-none-eabi"
13 %struct.e = type { double, double, double }
15 declare i32 @llvm.arm.space(i32, i32)
17 define hidden arm_aapcs_vfpcc %struct.e @h() {
25 exposesReturnsTwice: false
27 regBankSelected: false
30 tracksRegLiveness: true
35 isFrameAddressTaken: false
36 isReturnAddressTaken: false
45 cvBytesOfCalleeSavedRegisters: 0
46 hasOpaqueSPAdjustment: false
48 hasMustTailInVarArgFunc: false
56 value: 'double 0.000000e+00'
58 isTargetSpecific: false
60 value: 'double 7.020000e+02'
62 isTargetSpecific: false
64 value: 'double 2.020000e+02'
66 isTargetSpecific: false
67 machineFunctionInfo: {}
69 ; CHECK-LABEL: name: h
71 ; CHECK-NEXT: successors: %bb.4(0x80000000)
73 ; CHECK-NEXT: renamable $d0 = VLDRD %const.3, 0, 14 /* CC::al */, $noreg :: (load (s64) from constant-pool)
74 ; CHECK-NEXT: dead renamable $r0 = SPACE 40, undef renamable $r0
75 ; CHECK-NEXT: tB %bb.4, 14 /* CC::al */, $noreg
77 ; CHECK-NEXT: bb.1 (align 8):
78 ; CHECK-NEXT: successors:
80 ; CHECK-NEXT: CONSTPOOL_ENTRY 3, %const.0, 8
83 ; CHECK-NEXT: successors:
85 ; CHECK-NEXT: bb.3 (align 8):
86 ; CHECK-NEXT: successors:
88 ; CHECK-NEXT: CONSTPOOL_ENTRY 5, %const.2, 8
90 ; CHECK-NEXT: bb.4 (align 2):
91 ; CHECK-NEXT: successors: %bb.5(0x80000000)
93 ; CHECK-NEXT: dead renamable $r0 = SPACE 790, undef renamable $r0
96 ; CHECK-NEXT: successors: %bb.7(0x80000000)
98 ; CHECK-NEXT: renamable $r0 = t2MOVi 0, 14 /* CC::al */, $noreg, $noreg
99 ; CHECK-NEXT: t2CMPri $r0, 32, 14 /* CC::al */, $noreg, implicit-def $cpsr
100 ; CHECK-NEXT: renamable $r0 = SPACE 200, undef renamable $r0
101 ; CHECK-NEXT: t2IT 0, 1, implicit-def $itstate
102 ; CHECK-NEXT: renamable $d0 = VLDRD %const.7, 0, 0 /* CC::eq */, $cpsr, implicit $itstate :: (load (s64) from constant-pool)
103 ; CHECK-NEXT: renamable $d1 = VLDRD %const.5, 0, 0 /* CC::eq */, $cpsr, implicit $itstate :: (load (s64) from constant-pool)
104 ; CHECK-NEXT: renamable $d2 = VLDRD %const.6, 0, 0 /* CC::eq */, $cpsr, implicit $itstate :: (load (s64) from constant-pool)
105 ; CHECK-NEXT: $r0 = t2SUBri $r0, 12, 0 /* CC::eq */, $cpsr, $noreg, implicit killed $itstate
106 ; CHECK-NEXT: t2B %bb.7, 14 /* CC::al */, $noreg
108 ; CHECK-NEXT: bb.6 (align 8):
109 ; CHECK-NEXT: successors:
111 ; CHECK-NEXT: CONSTPOOL_ENTRY 7, %const.1, 8
113 ; CHECK-NEXT: bb.7 (align 2):
114 ; CHECK-NEXT: liveins: $r0, $cpsr, $d0, $s0, $s1, $d1, $s2, $s3, $d2, $s4, $s5
116 ; CHECK-NEXT: t2IT 0, 4, implicit-def $itstate
117 ; CHECK-NEXT: $sp = tMOVr $r0, 0 /* CC::eq */, $cpsr, implicit $itstate
118 ; CHECK-NEXT: $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
120 ; CHECK-NEXT: bb.8 (align 8):
121 ; CHECK-NEXT: successors:
123 ; CHECK-NEXT: CONSTPOOL_ENTRY 6, %const.0, 8
125 ; CHECK-NEXT: bb.9 (align 2):
126 ; CHECK-NEXT: successors: %bb.9(0x80000000)
128 ; CHECK-NEXT: dead renamable $r0 = SPACE 4000, undef renamable $r0
129 ; CHECK-NEXT: t2B %bb.9, 14 /* CC::al */, $noreg
133 successors: %bb.1(0x80000000)
135 renamable $d0 = VLDRD %const.0, 0, 14, $noreg :: (load (s64) from constant-pool)
136 dead renamable $r0 = SPACE 40, undef renamable $r0
139 successors: %bb.2(0x80000000)
141 dead renamable $r0 = SPACE 790, undef renamable $r0
146 renamable $r0 = t2MOVi 0, 14, _, _
147 t2CMPri $r0, 32, 14, $noreg, implicit-def $cpsr
148 renamable $r0 = SPACE 200, undef renamable $r0
149 t2IT 0, 1, implicit-def $itstate
150 renamable $d0 = VLDRD %const.1, 0, 0, $cpsr, implicit $itstate :: (load (s64) from constant-pool)
151 renamable $d1 = VLDRD %const.2, 0, 0, $cpsr, implicit $itstate :: (load (s64) from constant-pool)
152 renamable $d2 = VLDRD %const.0, 0, 0, $cpsr, implicit $itstate :: (load (s64) from constant-pool)
153 $r0 = t2SUBri $r0, 12, 0, $cpsr, $noreg, implicit killed $itstate
154 t2IT 0, 4, implicit-def $itstate
155 $sp = tMOVr $r0, 0, $cpsr, implicit $itstate
156 $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
159 successors: %bb.3(0x80000000)
161 dead renamable $r0 = SPACE 4000, undef renamable $r0
162 t2B %bb.3, 14, $noreg