1# RUN: llc -mtriple=thumbv7-none-eabi -run-pass=arm-cp-islands %s -o - | FileCheck %s 2# 3# This checks alignment of a new block when a big basic block is split up. 4# 5--- | 6 ; ModuleID = '<stdin>' 7 source_filename = "<stdin>" 8 target datalayout = "e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64" 9 target triple = "thumbv7-arm--eabi" 10 11 declare i32 @llvm.arm.space(i32, i32) #0 12 13 define dso_local i32 @THUMB(i32 %A.coerce) local_unnamed_addr #1 { 14 entry: 15 %F = alloca float, align 4 16 %S = alloca half, align 2 17 %tmp.0.extract.trunc = trunc i32 %A.coerce to i16 18 %0 = bitcast i16 %tmp.0.extract.trunc to half 19 store volatile float 4.200000e+01, float* %F, align 4 20 store volatile half 0xH3C00, half* %S, align 2 21 %S.0.S.0.142 = load volatile half, half* %S, align 2 22 %1 = call i32 @llvm.arm.space(i32 1230, i32 undef) 23 %add42 = fadd half %S.0.S.0.142, 0xH2E66 24 store volatile half %add42, half* %S, align 2 25 %2 = call i32 @llvm.arm.space(i32 1330, i32 undef) 26 %S.0.S.0.119 = load volatile half, half* %S, align 2 27 %3 = bitcast half %add42 to i16 28 %tmp87.0.insert.ext = zext i16 %3 to i32 29 ret i32 %tmp87.0.insert.ext 30 } 31 32 attributes #0 = { nounwind } 33 attributes #1 = { minsize nounwind optsize "target-features"="+crc,+crypto,+dsp,+fp-armv8,+fullfp16,+hwdiv,+hwdiv-arm,+neon,+ras,+strict-align,+thumb-mode" } 34 35... 36--- 37name: THUMB 38alignment: 2 39tracksRegLiveness: true 40frameInfo: 41 stackSize: 8 42 maxAlignment: 4 43 maxCallFrameSize: 0 44stack: 45 - { id: 0, name: F, offset: -4, size: 4, alignment: 4, stack-id: default, local-offset: -4 } 46 - { id: 1, name: S, offset: -6, size: 2, alignment: 2, stack-id: default, local-offset: -6 } 47constants: 48 - id: 0 49 value: i32 1109917696 50 alignment: 4 51 - id: 1 52 value: half 0xH2E66 53 alignment: 2 54 55#CHECK: t2B %[[BB3:bb.[0-9]]] 56#CHECK: bb.{{.}} (align 4): 57#CHECK: successors: 58#CHECK: CONSTPOOL_ENTRY 2, %const.{{.}}, 4 59#CHECK: bb.{{.}} (align 2): 60#CHECK: successors: 61#CHECK: CONSTPOOL_ENTRY 3, %const.{{.}}, 2 62#CHECK: [[BB3]].entry (align 2): 63 64body: | 65 bb.0.entry: 66 $sp = frame-setup tSUBspi $sp, 2, 14, $noreg 67 frame-setup CFI_INSTRUCTION def_cfa_offset 8 68 renamable $r0 = tLDRpci %const.0, 14, $noreg :: (load 4 from constant-pool) 69 renamable $s0 = FCONSTH 112, 14, $noreg 70 tSTRspi killed renamable $r0, $sp, 1, 14, $noreg :: (volatile store 4 into %ir.F) 71 VSTRH killed renamable $s0, $sp, 1, 14, $noreg :: (volatile store 2 into %ir.S) 72 renamable $s2 = VLDRH $sp, 1, 14, $noreg :: (volatile dereferenceable load 2 from %ir.S) 73 renamable $s0 = VLDRH %const.1, 0, 14, $noreg :: (load 2 from constant-pool) 74 dead renamable $r0 = SPACE 1230, undef renamable $r0 75 renamable $s0 = VADDH killed renamable $s2, killed renamable $s0, 14, $noreg 76 VSTRH renamable $s0, $sp, 1, 14, $noreg :: (volatile store 2 into %ir.S) 77 renamable $r0 = VMOVRH killed renamable $s0, 14, $noreg 78 dead renamable $r1 = SPACE 1330, undef renamable $r0 79 dead renamable $s0 = VLDRH $sp, 1, 14, $noreg :: (volatile dereferenceable load 2 from %ir.S) 80 $sp = tADDspi $sp, 2, 14, $noreg 81 tBX_RET 14, $noreg, implicit killed $r0 82 83... 84