~pali/+junk/llvm-toolchain-3.7

« back to all changes in this revision

Viewing changes to test/CodeGen/PowerPC/alias.ll

  • Committer: Package Import Robot
  • Author(s): Sylvestre Ledru
  • Date: 2015-07-15 17:51:08 UTC
  • Revision ID: package-import@ubuntu.com-20150715175108-l8mynwovkx4zx697
Tags: upstream-3.7~+rc2
ImportĀ upstreamĀ versionĀ 3.7~+rc2

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
; RUN: llc < %s -mtriple=powerpc64-unknown-linux-gnu -code-model=medium| FileCheck --check-prefix=CHECK --check-prefix=MEDIUM %s
 
2
; RUN: llc < %s -mtriple=powerpc64-unknown-linux-gnu -code-model=large | FileCheck --check-prefix=CHECK --check-prefix=LARGE %s
 
3
 
 
4
@foo = global i32 42
 
5
@fooa = alias i32* @foo
 
6
 
 
7
@foo2 = global i64 42
 
8
@foo2a = alias i64* @foo2
 
9
 
 
10
; CHECK-LABEL: bar:
 
11
define i32 @bar() {
 
12
; MEDIUM: addis 3, 2, fooa@toc@ha
 
13
; LARGE: addis 3, 2, .L[[L0:.*]]@toc@ha
 
14
  %a = load i32, i32* @fooa
 
15
  ret i32 %a
 
16
}
 
17
 
 
18
; CHECK-LABEL: bar2:
 
19
define i64 @bar2() {
 
20
; MEDIUM: addis 3, 2, foo2a@toc@ha
 
21
; MEDIUM: addi 3, 3, foo2a@toc@l
 
22
; LARGE: addis 3, 2, .L[[L1:.*]]@toc@ha
 
23
  %a = load i64, i64* @foo2a
 
24
  ret i64 %a
 
25
}
 
26
 
 
27
; LARGE: .L[[L0]]:
 
28
; LARGE-NEXT: .tc fooa[TC],fooa
 
29
 
 
30
; LARGE: .L[[L1]]:
 
31
; LARGE-NEXT: .tc foo2a[TC],foo2a