blob: ea1e585490484d313bfadb56600bf8a5b03b7d3a [file] [log] [blame]
Reid Spencer69ccadd2006-12-02 04:23:10 +00001; RUN: llvm-upgrade < %s | llvm-as | opt -indvars | llvm-dis | grep indvar
Chris Lattner46d5bca2003-09-12 16:42:16 +00002
3int %test() {
4 br bool true, label %LoopHead, label %LoopHead
5
6LoopHead:
Chris Lattner4dcd0d12004-03-16 21:10:15 +00007 %A = phi int [7, %0], [7, %0], [%B, %LoopHead]
Chris Lattner46d5bca2003-09-12 16:42:16 +00008 %B = add int %A, 1
9 br bool false, label %LoopHead, label %Out
10Out:
11 ret int %B
12}