1; RUN: opt -global-merge -global-merge-max-offset=100 -S -o - %s | FileCheck %s 2 3target datalayout = "e-p:64:64" 4target triple = "x86_64-unknown-linux-gnu" 5 6; CHECK: @_MergedGlobals = private global { i32, i32 } { i32 1, i32 2 } 7 8; CHECK: @a = internal alias i32, getelementptr inbounds ({ i32, i32 }, { i32, i32 }* @_MergedGlobals, i32 0, i32 0) 9@a = internal global i32 1 10 11; CHECK: @b = internal alias i32, getelementptr inbounds ({ i32, i32 }, { i32, i32 }* @_MergedGlobals, i32 0, i32 1) 12@b = internal global i32 2 13 14define void @use() { 15 ; CHECK: load i32, i32* getelementptr inbounds ({ i32, i32 }, { i32, i32 }* @_MergedGlobals, i32 0, i32 0) 16 %x = load i32, i32* @a 17 ; CHECK: load i32, i32* getelementptr inbounds ({ i32, i32 }, { i32, i32 }* @_MergedGlobals, i32 0, i32 1) 18 %y = load i32, i32* @b 19 ret void 20} 21