~ubuntu-branches/ubuntu/quantal/llvm-3.1/quantal

« back to all changes in this revision

Viewing changes to test/CodeGen/ARM/global-merge.ll

  • Committer: Package Import Robot
  • Author(s): Sylvestre Ledru
  • Date: 2012-03-29 19:09:51 UTC
  • Revision ID: package-import@ubuntu.com-20120329190951-aq83ivog4cg8bxun
Tags: upstream-3.1~svn153643
ImportĀ upstreamĀ versionĀ 3.1~svn153643

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
; RUN: llc < %s -mtriple=thumb-apple-darwin | FileCheck %s
 
2
; Test the ARMGlobalMerge pass.  Use -march=thumb because it has a small
 
3
; value for the maximum offset (127).
 
4
 
 
5
; A local array that exceeds the maximum offset should not be merged.
 
6
; CHECK: g0:
 
7
@g0 = internal global [32 x i32] [ i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 9, i32 10, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 9, i32 10, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 9, i32 10, i32 1, i32 2 ]
 
8
 
 
9
; CHECK: _MergedGlobals:
 
10
@g1 = internal global i32 1
 
11
@g2 = internal global i32 2
 
12
 
 
13
; Make sure that the complete variable fits within the range of the maximum
 
14
; offset.  Having the starting offset in range is not sufficient.
 
15
; When this works properly, @g3 is placed in a separate chunk of merged globals.
 
16
; CHECK: _MergedGlobals1:
 
17
@g3 = internal global [30 x i32] [ i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 9, i32 10, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 9, i32 10, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 9, i32 10 ], align 4
 
18
 
 
19
; Global variables that can be placed in BSS should be kept together in a
 
20
; separate pool of merged globals.
 
21
; CHECK: _MergedGlobals2
 
22
@g4 = internal global i32 0
 
23
@g5 = internal global i32 0