source: icGREP/icgrep-devel/llvm-3.8.0.src/test/Analysis/ScalarEvolution/2008-07-29-SGTTripCount.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: 774 bytes
Line 
1; RUN: opt < %s -analyze -scalar-evolution \
2; RUN:   -scalar-evolution-max-iterations=0 | FileCheck %s
3; PR2607
4
5define i32 @_Z1aj(i32 %j) nounwind  {
6entry:
7        icmp sgt i32 0, %j              ; <i1>:0 [#uses=1]
8        br i1 %0, label %bb.preheader, label %return
9
10bb.preheader:           ; preds = %entry
11        br label %bb
12
13bb:             ; preds = %bb, %bb.preheader
14        %i.01 = phi i32 [ %1, %bb ], [ 0, %bb.preheader ]               ; <i32> [#uses=1]
15        add i32 %i.01, -1               ; <i32>:1 [#uses=3]
16        icmp sgt i32 %1, %j             ; <i1>:2 [#uses=1]
17        br i1 %2, label %bb, label %return.loopexit
18
19return.loopexit:                ; preds = %bb
20        br label %return
21
22return:         ; preds = %return.loopexit, %entry
23        %i.0.lcssa = phi i32 [ 0, %entry ], [ %1, %return.loopexit ]            ; <i32> [#uses=1]
24        ret i32 %i.0.lcssa
25}
26
27; CHECK: backedge-taken count is (-1 + (-1 * %j))
28
Note: See TracBrowser for help on using the repository browser.