diff options
author | Bob Wilson <bob.wilson@apple.com> | 2010-11-17 21:25:36 +0000 |
---|---|---|
committer | Bob Wilson <bob.wilson@apple.com> | 2010-11-17 21:25:36 +0000 |
commit | 4c8ab19c225ea95587bf06dc5d2107c59e1678a4 (patch) | |
tree | f2f2f23e6f5e013f9c698b70ca2a40d7c132778c /llvm/test | |
parent | 59182fb4b5c2aa82a9e3d6cd0d69a46728e5fa73 (diff) | |
download | bcm5719-llvm-4c8ab19c225ea95587bf06dc5d2107c59e1678a4.tar.gz bcm5719-llvm-4c8ab19c225ea95587bf06dc5d2107c59e1678a4.zip |
Fix ARMGlobalMerge pass to check if globals are entirely within range.
It is generally not sufficient to check if the starting offset is in range
of the maximum offset that can be efficiently used for the target.
llvm-svn: 119565
Diffstat (limited to 'llvm/test')
-rw-r--r-- | llvm/test/CodeGen/ARM/global-merge.ll | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/ARM/global-merge.ll b/llvm/test/CodeGen/ARM/global-merge.ll index dcc16c07ef4..e519dde33a0 100644 --- a/llvm/test/CodeGen/ARM/global-merge.ll +++ b/llvm/test/CodeGen/ARM/global-merge.ll @@ -9,3 +9,9 @@ ; CHECK: _MergedGlobals: @g1 = internal global i32 1 @g2 = internal global i32 2 + +; Make sure that the complete variable fits within the range of the maximum +; offset. Having the starting offset in range is not sufficient. +; When this works properly, @g3 is placed in a separate chunk of merged globals. +; CHECK: _MergedGlobals1: +@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 ] |