summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen/ARM/global-merge.ll
diff options
context:
space:
mode:
authorBob Wilson <bob.wilson@apple.com>2010-11-17 21:25:27 +0000
committerBob Wilson <bob.wilson@apple.com>2010-11-17 21:25:27 +0000
commitf796d4b4698eef2e6fe72d4fea4668d0bc8a5775 (patch)
treef26754a23f4a7699c7f1ad0af5daa7b428662329 /llvm/test/CodeGen/ARM/global-merge.ll
parentafd6db99322ca8a6556b1e93699b4b4c9ebf5080 (diff)
downloadbcm5719-llvm-f796d4b4698eef2e6fe72d4fea4668d0bc8a5775.tar.gz
bcm5719-llvm-f796d4b4698eef2e6fe72d4fea4668d0bc8a5775.zip
Fix the ARMGlobalMerge pass to look at variable sizes instead of pointer sizes.
It was mistakenly looking at the pointer type when checking for the size of global variables. This is a partial fix for Radar 8673120. llvm-svn: 119563
Diffstat (limited to 'llvm/test/CodeGen/ARM/global-merge.ll')
-rw-r--r--llvm/test/CodeGen/ARM/global-merge.ll11
1 files changed, 11 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/ARM/global-merge.ll b/llvm/test/CodeGen/ARM/global-merge.ll
new file mode 100644
index 00000000000..9cadebd9c5a
--- /dev/null
+++ b/llvm/test/CodeGen/ARM/global-merge.ll
@@ -0,0 +1,11 @@
+; RUN: llc < %s -march=thumb | FileCheck %s
+; Test the ARMGlobalMerge pass. Use -march=thumb because it has a small
+; value for the maximum offset (127).
+
+; A local array that exceeds the maximum offset should not be merged.
+; CHECK: g0:
+@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 ]
+
+; CHECK: merged:
+@g1 = internal global i32 1
+@g2 = internal global i32 2
OpenPOWER on IntegriCloud