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.
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"
14 %struct.e = type { double, double, double }
16 declare i32 @llvm.arm.space(i32, i32)
18 define hidden arm_aapcs_vfpcc %struct.e @h() {
26 exposesReturnsTwice: false
28 regBankSelected: false
31 tracksRegLiveness: true
36 isFrameAddressTaken: false
37 isReturnAddressTaken: false
46 cvBytesOfCalleeSavedRegisters: 0
47 hasOpaqueSPAdjustment: false
49 hasMustTailInVarArgFunc: false
57 value: 'double 0.000000e+00'
59 isTargetSpecific: false
61 value: 'double 7.020000e+02'
63 isTargetSpecific: false
65 value: 'double 2.020000e+02'
67 isTargetSpecific: false
68 machineFunctionInfo: {}
70 ; CHECK-LABEL: name: h
72 ; CHECK: successors: %bb.4(0x80000000)
73 ; CHECK: renamable $d0 = VLDRD %const.3, 0, 14 /* CC::al */, $noreg :: (load (s64) 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):
78 ; CHECK: CONSTPOOL_ENTRY 3, %const.0, 8
81 ; CHECK: bb.3 (align 8):
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
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 (s64) from constant-pool)
94 ; CHECK: renamable $d1 = VLDRD %const.5, 0, 0 /* CC::eq */, $cpsr, implicit $itstate :: (load (s64) from constant-pool)
95 ; CHECK: renamable $d2 = VLDRD %const.6, 0, 0 /* CC::eq */, $cpsr, implicit $itstate :: (load (s64) 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):
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):
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
115 successors: %bb.1(0x80000000)
117 renamable $d0 = VLDRD %const.0, 0, 14, $noreg :: (load (s64) from constant-pool)
118 dead renamable $r0 = SPACE 40, undef renamable $r0
121 successors: %bb.2(0x80000000)
123 dead renamable $r0 = SPACE 790, undef renamable $r0
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 (s64) from constant-pool)
133 renamable $d1 = VLDRD %const.2, 0, 0, $cpsr, implicit $itstate :: (load (s64) from constant-pool)
134 renamable $d2 = VLDRD %const.0, 0, 0, $cpsr, implicit $itstate :: (load (s64) 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
141 successors: %bb.3(0x80000000)
143 dead renamable $r0 = SPACE 4000, undef renamable $r0
144 t2B %bb.3, 14, $noreg