blob: abbe518f06ab2d44cdb678219ca8fa64c5c753a0 [file] [log] [blame]
Dan Gohman1b4c27772009-09-08 16:50:01 +00001; RUN: opt %s -indvars | llvm-dis | grep indvar
Dan Gohmanf17a25c2007-07-18 16:29:46 +00002
Tanya Lattner4c4d0b82008-03-01 09:15:35 +00003@G = global i64 0 ; <i64*> [#uses=1]
Dan Gohmanf17a25c2007-07-18 16:29:46 +00004
Tanya Lattner4c4d0b82008-03-01 09:15:35 +00005define void @test(i64 %V) {
6; <label>:0
7 br label %Loop
8
9Loop: ; preds = %Loop, %0
10 %X = phi i64 [ 1, %0 ], [ %X.next, %Loop ] ; <i64> [#uses=2]
11 %X.next = sub i64 %X, %V ; <i64> [#uses=1]
12 store i64 %X, i64* @G
13 br label %Loop
Dan Gohmanf17a25c2007-07-18 16:29:46 +000014}
Tanya Lattner4c4d0b82008-03-01 09:15:35 +000015