1 # RUN: llc -run-pass=arm-cp-islands %s -o - | FileCheck %s
3 # This test make sure that the constant pool does not keep in the middle of an IT block
4 # 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: {}
70 successors: %bb.1(0x80000000)
72 renamable $d0 = VLDRD %const.0, 0, 14, $noreg :: (load 8 from constant-pool)
73 dead renamable $r0 = SPACE 40, undef renamable $r0
76 successors: %bb.2(0x80000000)
78 dead renamable $r0 = SPACE 790, undef renamable $r0
83 renamable $r0 = t2MOVi 0, 14, _, _
84 t2CMPri $r0, 32, 14, $noreg, implicit-def $cpsr
85 renamable $r0 = SPACE 200, undef renamable $r0
86 ; CHECK: t2IT 0, 1, implicit-def $itstate
87 ; CHECK-NEXT: renamable $d0 = VLDRD %const.7, 0, 0, $cpsr, implicit $itstate :: (load 8 from constant-pool)
88 ; CHECK-NEXT: renamable $d1 = VLDRD %const.5, 0, 0, $cpsr, implicit $itstate :: (load 8 from constant-pool)
89 ; CHECK-NEXT: renamable $d2 = VLDRD %const.6, 0, 0, $cpsr, implicit $itstate :: (load 8 from constant-pool)
90 ; CHECK-NEXT: $r0 = t2SUBri $r0, 12, 0, $cpsr, $noreg, implicit killed $itstate
91 t2IT 0, 1, implicit-def $itstate
92 renamable $d0 = VLDRD %const.1, 0, 0, $cpsr, implicit $itstate :: (load 8 from constant-pool)
93 renamable $d1 = VLDRD %const.2, 0, 0, $cpsr, implicit $itstate :: (load 8 from constant-pool)
94 renamable $d2 = VLDRD %const.0, 0, 0, $cpsr, implicit $itstate :: (load 8 from constant-pool)
95 $r0 = t2SUBri $r0, 12, 0, $cpsr, $noreg, implicit killed $itstate
96 t2IT 0, 4, implicit-def $itstate
97 $sp = tMOVr $r0, 0, $cpsr, implicit $itstate
98 $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
99 tBL 14, $noreg, &__stack_chk_fail, csr_aapcs, implicit-def dead $lr, implicit $sp, implicit-def $sp
102 successors: %bb.3(0x80000000)
105 dead renamable $r0 = SPACE 4000, undef renamable $r0
106 t2B %bb.3, 14, $noreg