source: icGREP/icgrep-devel/llvm-3.8.0.src/test/Analysis/ScalarEvolution/do-loop.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: 518 bytes
Line 
1; RUN: opt < %s -analyze -scalar-evolution | FileCheck %s
2; PR1614
3
4; CHECK: smax
5
6define i32 @f(i32 %x, i32 %y) {
7entry:
8        br label %bb
9
10bb:             ; preds = %bb, %entry
11        %indvar = phi i32 [ 0, %entry ], [ %indvar.next, %bb ]          ; <i32> [#uses=2]
12        %x_addr.0 = add i32 %indvar, %x         ; <i32> [#uses=1]
13        %tmp2 = add i32 %x_addr.0, 1            ; <i32> [#uses=2]
14        %tmp5 = icmp slt i32 %tmp2, %y          ; <i1> [#uses=1]
15        %indvar.next = add i32 %indvar, 1               ; <i32> [#uses=1]
16        br i1 %tmp5, label %bb, label %bb7
17
18bb7:            ; preds = %bb
19        ret i32 %tmp2
20}
Note: See TracBrowser for help on using the repository browser.