1 ; Test the order of global variables during llvm-link
3 ; RUN: llvm-link %s %S/Inputs/globalorder-2.ll -o %t.bc
4 ; RUN: llvm-dis -o - %t.bc | FileCheck %s
6 @var1 = internal global i32 0, align 4
7 @var2 = internal global i32 0, align 4
8 @var3 = global ptr @var1, align 4
9 @var4 = global ptr @var2, align 4
13 %0 = load ptr, ptr @var3, align 4
14 %1 = load i32, ptr %0, align 4
15 %2 = load ptr, ptr @var4, align 4
16 %3 = load i32, ptr %2, align 4
17 %add = add nsw i32 %3, %1