• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; RUN: llc -mcpu=ppc64 < %s | FileCheck %s
2target datalayout = "E-m:e-i64:64-n32:64"
3target triple = "powerpc64-unknown-linux-gnu"
4
5define 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
15define 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
25