~ubuntu-branches/ubuntu/quantal/llvm-3.1/quantal

« back to all changes in this revision

Viewing changes to test/Transforms/JumpThreading/degenerate-phi.ll

  • Committer: Package Import Robot
  • Author(s): Sylvestre Ledru
  • Date: 2012-03-29 19:09:51 UTC
  • Revision ID: package-import@ubuntu.com-20120329190951-aq83ivog4cg8bxun
Tags: upstream-3.1~svn153643
ImportĀ upstreamĀ versionĀ 3.1~svn153643

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
; RUN: opt -jump-threading -disable-output %s
 
2
; PR9112
 
3
 
 
4
; This is actually a test for value tracking. Jump threading produces
 
5
; "%phi = phi i16" when it removes all edges leading to %unreachable.
 
6
; The .ll parser won't let us write that directly since it's invalid code.
 
7
 
 
8
define void @func() nounwind {
 
9
entry:
 
10
  br label %bb
 
11
 
 
12
bb:
 
13
  br label %bb
 
14
 
 
15
unreachable:
 
16
  %phi = phi i16 [ %add, %unreachable ], [ 0, %next ]
 
17
  %add = add i16 0, %phi
 
18
  %cmp = icmp slt i16 %phi, 0
 
19
  br i1 %cmp, label %unreachable, label %next
 
20
 
 
21
next:
 
22
  br label %unreachable
 
23
}
 
24