source: icGREP/icgrep-devel/llvm-3.8.0.src/test/Analysis/ScalarEvolution/2008-07-12-UnneededSelect2.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: 945 bytes
Line 
1; RUN: opt < %s -analyze -scalar-evolution 2>&1 | FileCheck %s
2; PR2070
3
4; CHECK: Printing analysis 'Scalar Evolution Analysis' for function 'a'
5; CHECK-NOT: smax
6
7define i32 @a(i32 %x) nounwind  {
8entry:
9        icmp sgt i32 %x, 1              ; <i1>:0 [#uses=1]
10        br i1 %0, label %bb.nph, label %bb2
11
12bb.nph:         ; preds = %entry
13        br label %bb
14
15bb:             ; preds = %bb1, %bb.nph
16        %z.02 = phi i32 [ %1, %bb1 ], [ 1, %bb.nph ]            ; <i32> [#uses=1]
17        %i.01 = phi i32 [ %2, %bb1 ], [ 1, %bb.nph ]            ; <i32> [#uses=2]
18        mul i32 %z.02, %i.01            ; <i32>:1 [#uses=2]
19        add i32 %i.01, 1                ; <i32>:2 [#uses=2]
20        br label %bb1
21
22bb1:            ; preds = %bb
23        icmp slt i32 %2, %x             ; <i1>:3 [#uses=1]
24        br i1 %3, label %bb, label %bb1.bb2_crit_edge
25
26bb1.bb2_crit_edge:              ; preds = %bb1
27        %.lcssa = phi i32 [ %1, %bb1 ]          ; <i32> [#uses=1]
28        br label %bb2
29
30bb2:            ; preds = %bb1.bb2_crit_edge, %entry
31        %z.0.lcssa = phi i32 [ %.lcssa, %bb1.bb2_crit_edge ], [ 1, %entry ]             ; <i32> [#uses=1]
32        ret i32 %z.0.lcssa
33}
Note: See TracBrowser for help on using the repository browser.