mirror of
https://github.com/RPCSX/llvm.git
synced 2024-11-24 12:19:53 +00:00
28f667b461
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270023 91177308-0d34-0410-b5e6-96231b3b80d8
21 lines
822 B
LLVM
21 lines
822 B
LLVM
; RUN: opt -global-merge -global-merge-max-offset=100 -S -o - %s | FileCheck %s
|
|
|
|
target datalayout = "e-p:64:64"
|
|
target triple = "x86_64-unknown-linux-gnu"
|
|
|
|
; CHECK: @_MergedGlobals = private global { i32, i32 } { i32 1, i32 2 }
|
|
|
|
; CHECK: @a = internal alias i32, getelementptr inbounds ({ i32, i32 }, { i32, i32 }* @_MergedGlobals, i32 0, i32 0)
|
|
@a = internal global i32 1
|
|
|
|
; CHECK: @b = internal alias i32, getelementptr inbounds ({ i32, i32 }, { i32, i32 }* @_MergedGlobals, i32 0, i32 1)
|
|
@b = internal global i32 2
|
|
|
|
define void @use() {
|
|
; CHECK: load i32, i32* getelementptr inbounds ({ i32, i32 }, { i32, i32 }* @_MergedGlobals, i32 0, i32 0)
|
|
%x = load i32, i32* @a
|
|
; CHECK: load i32, i32* getelementptr inbounds ({ i32, i32 }, { i32, i32 }* @_MergedGlobals, i32 0, i32 1)
|
|
%y = load i32, i32* @b
|
|
ret void
|
|
}
|