llvm.org GIT mirror llvm / 823572d
new testcase for PR1385 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36783 91177308-0d34-0410-b5e6-96231b3b80d8 Chris Lattner 12 years ago
1 changed file(s) with 36 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
0 ; RUN: llvm-as < %s | opt -loop-unroll | llvm-dis | not grep undef
1 ; PR1385
2
3 target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64"
4 target triple = "i686-apple-darwin8"
5 %struct.__mpz_struct = type { i32, i32, i32* }
6
7
8 define void @Foo(%struct.__mpz_struct* %base) {
9 entry:
10 %want = alloca [1 x %struct.__mpz_struct], align 16 ; <[1 x %struct.__mpz_struct]*> [#uses=4]
11 %want1 = getelementptr [1 x %struct.__mpz_struct]* %want, i32 0, i32 0 ; <%struct.__mpz_struct*> [#uses=1]
12 call void @__gmpz_init( %struct.__mpz_struct* %want1 )
13 %want27 = getelementptr [1 x %struct.__mpz_struct]* %want, i32 0, i32 0 ; <%struct.__mpz_struct*> [#uses=1]
14 %want3 = getelementptr [1 x %struct.__mpz_struct]* %want, i32 0, i32 0 ; <%struct.__mpz_struct*> [#uses=1]
15 %want2 = getelementptr [1 x %struct.__mpz_struct]* %want, i32 0, i32 0 ; <%struct.__mpz_struct*> [#uses=2]
16 br label %bb
17
18 bb: ; preds = %bb, %entry
19 %i.01.0 = phi i32 [ 0, %entry ], [ %indvar.next, %bb ] ; [#uses=1]
20 %want23.0 = phi %struct.__mpz_struct* [ %want27, %entry ], [ %want2, %bb ] ; <%struct.__mpz_struct*> [#uses=1]
21 call void @__gmpz_mul( %struct.__mpz_struct* %want23.0, %struct.__mpz_struct* %want3, %struct.__mpz_struct* %base )
22 %indvar.next = add i32 %i.01.0, 1 ; [#uses=2]
23 %exitcond = icmp ne i32 %indvar.next, 2 ; [#uses=1]
24 br i1 %exitcond, label %bb, label %bb10
25
26 bb10: ; preds = %bb
27 %want2.lcssa = phi %struct.__mpz_struct* [ %want2, %bb ] ; <%struct.__mpz_struct*> [#uses=1]
28 call void @__gmpz_clear( %struct.__mpz_struct* %want2.lcssa )
29 ret void
30 }
31
32 declare void @__gmpz_init(%struct.__mpz_struct*)
33 declare void @__gmpz_mul(%struct.__mpz_struct*, %struct.__mpz_struct*, %struct.__mpz_struct*)
34 declare void @__gmpz_clear(%struct.__mpz_struct*)
35