summaryrefslogtreecommitdiff
path: root/llvm/test/CodeGen/X86/hidden-vis-2.ll
blob: e98117d99ee1d99a520da27cff1d93c8d5370505 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
; RUN: llc < %s -mtriple=i386-apple-darwin9   | FileCheck %s --check-prefix=i386-darwin9
; RUN: llc < %s -mtriple=x86_64-apple-darwin9 | FileCheck %s --check-prefix=x86_64-darwin9

@x = weak hidden global i32 0		; <ptr> [#uses=1]

define i32 @t() nounwind readonly {
; i386-darwin9-LABEL: t:
; i386-darwin9:       ## %bb.0: ## %entry
; i386-darwin9-NEXT:    movl _x, %eax
; i386-darwin9-NEXT:    retl
;
; x86_64-darwin9-LABEL: t:
; x86_64-darwin9:       ## %bb.0: ## %entry
; x86_64-darwin9-NEXT:    movl _x(%rip), %eax
; x86_64-darwin9-NEXT:    retq
entry:
	%0 = load i32, ptr @x, align 4		; <i32> [#uses=1]
	ret i32 %0
}