~pali/+junk/llvm-toolchain-3.7

« back to all changes in this revision

Viewing changes to test/CodeGen/PowerPC/add-fi.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 -mcpu=ppc64 < %s | FileCheck %s
 
2
target datalayout = "E-m:e-i64:64-n32:64"
 
3
target triple = "powerpc64-unknown-linux-gnu"
 
4
 
 
5
define i32* @test1() {
 
6
        %X = alloca { i32, i32 }
 
7
        %Y = getelementptr {i32,i32}, {i32,i32}* %X, i32 0, i32 1
 
8
        ret i32* %Y
 
9
 
 
10
; CHECK-LABEL: @test1
 
11
; CHECK: addi 3, 1, -4
 
12
; CHECK: blr
 
13
}
 
14
 
 
15
define i32* @test2() {
 
16
        %X = alloca { i32, i32, i32, i32 }
 
17
        %Y = getelementptr {i32,i32,i32,i32}, {i32,i32,i32,i32}* %X, i32 0, i32 3
 
18
        ret i32* %Y
 
19
 
 
20
; CHECK-LABEL: @test2
 
21
; CHECK: addi 3, 1, -4
 
22
; CHECK: blr
 
23
}
 
24