Revert "[AArch64] Add DAG combine for extract extend pattern"
[oota-llvm.git] / test / CodeGen / Mips / stackcoloring.ll
1 ; RUN: llc -march=mipsel < %s | FileCheck %s
2
3 @g1 = external global i32*
4
5 ; CHECK-LABEL: foo1:
6 ; CHECK: lw ${{[0-9]+}}, %got(g1)
7 ; CHECK: # %for.body
8 ; CHECK: # %for.end
9
10 define i32 @foo1() {
11 entry:
12   %b = alloca [16 x i32], align 4
13   %0 = bitcast [16 x i32]* %b to i8*
14   call void @llvm.lifetime.start(i64 64, i8* %0)
15   %arraydecay = getelementptr inbounds [16 x i32], [16 x i32]* %b, i32 0, i32 0
16   br label %for.body
17
18 for.body:                                         ; preds = %for.body, %entry
19   %i.05 = phi i32 [ 0, %entry ], [ %inc, %for.body ]
20   %v.04 = phi i32 [ 0, %entry ], [ %add, %for.body ]
21   %1 = load i32*, i32** @g1, align 4
22   %arrayidx = getelementptr inbounds i32, i32* %1, i32 %i.05
23   %2 = load i32, i32* %arrayidx, align 4
24   %call = call i32 @foo2(i32 %2, i32* %arraydecay)
25   %add = add nsw i32 %call, %v.04
26   %inc = add nsw i32 %i.05, 1
27   %exitcond = icmp eq i32 %inc, 10000
28   br i1 %exitcond, label %for.end, label %for.body
29
30 for.end:                                          ; preds = %for.body
31   call void @llvm.lifetime.end(i64 64, i8* %0)
32   ret i32 %add
33 }
34
35 declare void @llvm.lifetime.start(i64, i8* nocapture)
36
37 declare i32 @foo2(i32, i32*)
38
39 declare void @llvm.lifetime.end(i64, i8* nocapture)