Home | History | Annotate | Download | only in MCJIT
      1 ; RUN: %lli %s > /dev/null
      2 
      3 @count = global i32 0, align 4
      4 
      5 define i32 @main() nounwind uwtable {
      6 entry:
      7   %retval = alloca i32, align 4
      8   %i = alloca i32, align 4
      9   store i32 0, i32* %retval
     10   store i32 0, i32* %i, align 4
     11   br label %for.cond
     12 
     13 for.cond:                                         ; preds = %for.inc, %entry
     14   %0 = load i32, i32* %i, align 4
     15   %cmp = icmp slt i32 %0, 50
     16   br i1 %cmp, label %for.body, label %for.end
     17 
     18 for.body:                                         ; preds = %for.cond
     19   %1 = load i32, i32* @count, align 4
     20   %inc = add nsw i32 %1, 1
     21   store i32 %inc, i32* @count, align 4
     22   br label %for.inc
     23 
     24 for.inc:                                          ; preds = %for.body
     25   %2 = load i32, i32* %i, align 4
     26   %inc1 = add nsw i32 %2, 1
     27   store i32 %inc1, i32* %i, align 4
     28   br label %for.cond
     29 
     30 for.end:                                          ; preds = %for.cond
     31   %3 = load i32, i32* @count, align 4
     32   %sub = sub nsw i32 %3, 50
     33   ret i32 %sub
     34 }
     35