1 ; RUN: llc < %s -mtriple=i386-apple-darwin9 | FileCheck %s -check-prefix=X32
2 ; RUN: llc < %s -mtriple=x86_64-apple-darwin9 | FileCheck %s -check-prefix=X64
4 @x = external hidden global i32 ; <ptr> [#uses=1]
5 @y = extern_weak hidden global i32 ; <ptr> [#uses=1]
7 define i32 @t() nounwind readonly {
9 ;; movl _y, %eax can be used if @y is dso_local.
11 ; X32: movl L_y$non_lazy_ptr, %eax
12 ; X32-NEXT: movl (%eax), %eax
15 ; X64: movq _y@GOTPCREL(%rip), %rax
17 %0 = load i32, ptr @x, align 4 ; <i32> [#uses=1]
18 %1 = load i32, ptr @y, align 4 ; <i32> [#uses=1]
19 %2 = add i32 %1, %0 ; <i32> [#uses=1]