source: icGREP/icgrep-devel/llvm-3.8.0.src/test/Analysis/ScalarEvolution/2008-02-11-ReversedCondition.ll @ 5027

Last change on this file since 5027 was 5027, checked in by cameron, 3 years ago

Upgrade to llvm 3.8

File size: 371 bytes
Line 
1; RUN: opt < %s -scalar-evolution -analyze | FileCheck %s
2
3; CHECK: Loop %header: backedge-taken count is (0 smax %n)
4
5define void @foo(i32 %n) {
6entry:
7        br label %header
8header:
9        %i = phi i32 [ 0, %entry ], [ %i.inc, %next ]
10        %cond = icmp sgt i32 %n, %i
11        br i1 %cond, label %next, label %return
12next:
13        %i.inc = add i32 %i, 1
14        br label %header
15return:
16        ret void
17}
Note: See TracBrowser for help on using the repository browser.