diff options
author | Hans Wennborg <hans@hanshq.net> | 2018-01-24 15:53:46 +0000 |
---|---|---|
committer | Hans Wennborg <hans@hanshq.net> | 2018-01-24 15:53:46 +0000 |
commit | 50fb516bb51c98f3b8d5fd1bd4d11849a349c6bc (patch) | |
tree | b1a7321f8410b916305cf08f12d26b87bb2409e5 /test/CodeGen/ARM/global-merge-dllexport.ll | |
parent | 093b1726dc65511236f273cac248c1c1587cce1a (diff) |
Merging r322900 and r323307:
------------------------------------------------------------------------
r322900 | mstorsjo | 2018-01-18 22:21:48 +0100 (Thu, 18 Jan 2018) | 6 lines
[test] Actually check the common parts in CodeGen/ARM/global-merge-external.ll. NFC.
Previously, these parts weren't ever checked. The label patterns
need to be extended to match successfully on macho.
Differential Revision: https://reviews.llvm.org/D42126
------------------------------------------------------------------------
------------------------------------------------------------------------
r323307 | mstorsjo | 2018-01-24 07:40:04 +0100 (Wed, 24 Jan 2018) | 6 lines
[GlobalMerge] Don't merge dllexport globals
Merging such globals loses the dllexport attribute. Add a test
to check that normal globals still are merged.
Differential Revision: https://reviews.llvm.org/D42127
------------------------------------------------------------------------
git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_60@323337 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/ARM/global-merge-dllexport.ll')
-rw-r--r-- | test/CodeGen/ARM/global-merge-dllexport.ll | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/test/CodeGen/ARM/global-merge-dllexport.ll b/test/CodeGen/ARM/global-merge-dllexport.ll new file mode 100644 index 00000000000..680f57d0a17 --- /dev/null +++ b/test/CodeGen/ARM/global-merge-dllexport.ll @@ -0,0 +1,15 @@ +; RUN: llc < %s -mtriple=thumbv7-win32 -arm-global-merge | FileCheck %s + +@x = global i32 0, align 4 +@y = dllexport global i32 0, align 4 + +define void @f1(i32 %a1, i32 %a2) { +; CHECK: f1: +; CHECK: movw [[REG1:r[0-9]+]], :lower16:x +; CHECK: movt [[REG1]], :upper16:x + store i32 %a1, i32* @x, align 4 + store i32 %a2, i32* @y, align 4 + ret void +} + +; CHECK-NOT: .L_MergedGlobals |