diff options
author | Chris Lattner <sabre@nondot.org> | 2010-04-20 06:20:21 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2010-04-20 06:20:21 +0000 |
commit | 44e05080f828e80e262fc00cc1fa48a8a37b7f3e (patch) | |
tree | a3caf9c82828313c29f2f06c5793f846ca9d8ceb /test/CodeGen/PowerPC/2010-02-04-EmptyGlobal.ll | |
parent | aa2776e93451aa6d1311c109b16d02428f86865a (diff) | |
download | llvm-44e05080f828e80e262fc00cc1fa48a8a37b7f3e.tar.gz llvm-44e05080f828e80e262fc00cc1fa48a8a37b7f3e.tar.bz2 llvm-44e05080f828e80e262fc00cc1fa48a8a37b7f3e.tar.xz |
Bill's change in r95336 broke empty aggregates embedded
in other types. fix this by only bumping zero-byte globals
up to a single byte if the *entire global* is zero size,
fixing PR6340.
This also fixes empty arrays etc to be handled correctly,
and only does this on subsection-via-symbols targets (aka
darwin) which is the only place where this matters.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101879 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/PowerPC/2010-02-04-EmptyGlobal.ll')
-rw-r--r-- | test/CodeGen/PowerPC/2010-02-04-EmptyGlobal.ll | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/test/CodeGen/PowerPC/2010-02-04-EmptyGlobal.ll b/test/CodeGen/PowerPC/2010-02-04-EmptyGlobal.ll index 32ddb34848..1ba11d3fd0 100644 --- a/test/CodeGen/PowerPC/2010-02-04-EmptyGlobal.ll +++ b/test/CodeGen/PowerPC/2010-02-04-EmptyGlobal.ll @@ -8,4 +8,13 @@ ; CHECK: .globl __cmd ; CHECK-NEXT: .align 3 ; CHECK-NEXT: __cmd: -; CHECK-NEXT: .space 1 +; CHECK-NEXT: .byte 0 + +; PR6340 + +%Ty = type { i32, {}, i32 } +@k = global %Ty { i32 1, {} zeroinitializer, i32 3 } + +; CHECK: _k: +; CHECK-NEXT: .long 1 +; CHECK-NEXT: .long 3 |