brintos

brintos / llvm-project-archived public Read only

0
0
Text · 3.1 KiB · c16a62a Raw
109 lines · plain
1# RUN: llc -mtriple=arm-none-eabi -run-pass=arm-cp-islands %s -o - | FileCheck %s2#3# This checks alignment of a block when a CPE is placed before/after a4# block (as e.g. opposed to splitting up a block).5#6--- |7  ; ModuleID = '<stdin>'8  source_filename = "<stdin>"9  target datalayout = "e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64"10  target triple = "arm-arm--eabi"11 12  declare i32 @llvm.arm.space(i32, i32) #013 14  define dso_local i32 @CP() #1 {15  entry:16    %res = alloca half, align 217    store half 0xH706B, ptr %res, align 218    %0 = load half, ptr %res, align 219    %tobool = fcmp une half %0, 0xH000020    br i1 %tobool, label %LA, label %END21 22  LA:                                               ; preds = %entry23    %1 = call i32 @llvm.arm.space(i32 1000, i32 undef)24    br label %END25 26  END:                                              ; preds = %LA, %entry27    %2 = call i32 @llvm.arm.space(i32 100, i32 undef)28    ret i32 4229  }30 31  ; Function Attrs: nounwind32  declare void @llvm.stackprotector(ptr, ptr) #233 34  attributes #0 = { nounwind "target-features"="+v8.2a,+fullfp16" }35  attributes #1 = { "target-features"="+v8.2a,+fullfp16" }36  attributes #2 = { nounwind }37 38...39---40name:            CP41alignment:       442exposesReturnsTwice: false43legalized:       false44regBankSelected: false45selected:        false46tracksRegLiveness: true47registers:48liveins:49frameInfo:50  isFrameAddressTaken: false51  isReturnAddressTaken: false52  hasStackMap:     false53  hasPatchPoint:   false54  stackSize:       455  offsetAdjustment: 056  maxAlignment:    257  adjustsStack:    false58  hasCalls:        false59  stackProtector:  ''60  maxCallFrameSize: 061  hasOpaqueSPAdjustment: false62  hasVAStart:      false63  hasMustTailInVarArgFunc: false64  savePoint:       []65  restorePoint:    []66fixedStack:67stack:68  - { id: 0, name: res, type: default, offset: -2, size: 2, alignment: 2,69      stack-id: default, callee-saved-register: '', callee-saved-restored: true,70      local-offset: -2, debug-info-variable: '', debug-info-expression: '',71      debug-info-location: '' }72constants:73  - id:              074    value:           half 0xH706B75    alignment:       276    isTargetSpecific: false77 78 79#CHECK:  bb.{{.*}} (align 2):80#CHECK:    successors:81#CHECK:    CONSTPOOL_ENTRY 1, %const{{.*}}, 282# We want this block to be 4 byte aligned:83#CHECK:  bb.{{.*}}.LA (align 4):84 85body:             |86  bb.0.entry:87    successors: %bb.1(0x50000000), %bb.2(0x30000000)88 89    $sp = frame-setup SUBri $sp, 4, 14, $noreg, $noreg90    frame-setup CFI_INSTRUCTION def_cfa_offset 491    renamable $s0 = VLDRH %const.0, 0, 14, $noreg :: (load (s16) from constant-pool)92    VCMPZH renamable $s0, 14, $noreg, implicit-def $fpscr_nzcv, implicit $fpscr_rm93    VSTRH killed renamable $s0, $sp, 1, 14, $noreg :: (store (s16) into %ir.res)94    FMSTAT 14, $noreg, implicit-def $cpsr, implicit killed $fpscr_nzcv95    Bcc %bb.2, 0, killed $cpsr96 97  bb.1.LA:98    successors: %bb.2(0x80000000)99 100    dead renamable $r0 = SPACE 1000, undef renamable $r0101 102  bb.2.END:103    dead renamable $r0 = SPACE 100, undef renamable $r0104    $r0 = MOVi 42, 14, $noreg, $noreg105    $sp = ADDri $sp, 4, 14, $noreg, $noreg106    BX_RET 14, $noreg, implicit killed $r0107 108...109