1 ; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc64-unknown-linux-gnu -mcpu=ppc64 | FileCheck %s
2 target datalayout = "E-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-f128:128:128-v128:128:128-n32:64"
3 target triple = "powerpc64-unknown-linux-gnu"
5 define signext i32 @foo() #0 {
7 %v = alloca [8200 x i32], align 4
8 %w = alloca [8200 x i32], align 4
9 %q = alloca [8200 x i32], align 4
10 %0 = bitcast [8200 x i32]* %v to i8*
11 call void @llvm.lifetime.start.p0i8(i64 32800, i8* %0) #0
12 %1 = bitcast [8200 x i32]* %w to i8*
13 call void @llvm.lifetime.start.p0i8(i64 32800, i8* %1) #0
14 %2 = bitcast [8200 x i32]* %q to i8*
15 call void @llvm.lifetime.start.p0i8(i64 32800, i8* %2) #0
16 %arraydecay = getelementptr inbounds [8200 x i32], [8200 x i32]* %q, i64 0, i64 0
17 %arraydecay1 = getelementptr inbounds [8200 x i32], [8200 x i32]* %v, i64 0, i64 0
18 %arraydecay2 = getelementptr inbounds [8200 x i32], [8200 x i32]* %w, i64 0, i64 0
19 call void @bar(i32* %arraydecay, i32* %arraydecay1, i32* %arraydecay2) #0
20 %3 = load i32, i32* %arraydecay2, align 4
21 %arrayidx3 = getelementptr inbounds [8200 x i32], [8200 x i32]* %w, i64 0, i64 1
22 %4 = load i32, i32* %arrayidx3, align 4
26 ; CHECK: lwz {{[0-9]+}}, 0([[REG:[0-9]+]])
27 ; CHECK: lwz {{[0-9]+}}, 4([[REG]])
30 %add = add nsw i32 %4, %3
31 call void @llvm.lifetime.end.p0i8(i64 32800, i8* %2) #0
32 call void @llvm.lifetime.end.p0i8(i64 32800, i8* %1) #0
33 call void @llvm.lifetime.end.p0i8(i64 32800, i8* %0) #0
37 declare void @llvm.lifetime.start.p0i8(i64, i8* nocapture) #0
39 declare void @bar(i32*, i32*, i32*)
41 declare void @llvm.lifetime.end.p0i8(i64, i8* nocapture) #0
43 attributes #0 = { nounwind }