summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorJiangning Liu <jiangning.liu@arm.com>2014-04-22 03:33:26 +0000
committerJiangning Liu <jiangning.liu@arm.com>2014-04-22 03:33:26 +0000
commit0240286c23735cbfd2e0507bb74a2688a9208b65 (patch)
treec7335fbe1a503fbaf77ef9b3ec30962e2027e3be /test
parent846a14340c4c699d55b42e73e2336490c9255f11 (diff)
downloadllvm-0240286c23735cbfd2e0507bb74a2688a9208b65.tar.gz
llvm-0240286c23735cbfd2e0507bb74a2688a9208b65.tar.bz2
llvm-0240286c23735cbfd2e0507bb74a2688a9208b65.tar.xz
[AArch64] Enable global merge pass.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206861 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r--test/CodeGen/AArch64/global_merge_1.ll17
1 files changed, 17 insertions, 0 deletions
diff --git a/test/CodeGen/AArch64/global_merge_1.ll b/test/CodeGen/AArch64/global_merge_1.ll
new file mode 100644
index 0000000000..e0587d6b90
--- /dev/null
+++ b/test/CodeGen/AArch64/global_merge_1.ll
@@ -0,0 +1,17 @@
+; RUN: llc < %s -mtriple=aarch64-none-linux-gnu | FileCheck %s
+
+@m = internal global i32 0, align 4
+@n = internal global i32 0, align 4
+
+define void @f1(i32 %a1, i32 %a2) {
+; CHECK-LABEL: f1:
+; CHECK: adrp x{{[0-9]+}}, _MergedGlobals
+; CHECK-NOT: adrp
+ store i32 %a1, i32* @m, align 4
+ store i32 %a2, i32* @n, align 4
+ ret void
+}
+
+; CHECK: .local _MergedGlobals
+; CHECK: .comm _MergedGlobals,8,8
+