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

« back to all changes in this revision

Viewing changes to test/Transforms/SimplifyCFG/PhiNoEliminate.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 < %s -simplifycfg -S | \
 
2
; RUN:   not grep select
 
3
 
 
4
;; The PHI node in this example should not be turned into a select, as we are
 
5
;; not able to ifcvt the entire block.  As such, converting to a select just 
 
6
;; introduces inefficiency without saving copies.
 
7
 
 
8
define i32 @bar(i1 %C) {
 
9
entry:
 
10
        br i1 %C, label %then, label %endif
 
11
then:           ; preds = %entry
 
12
        %tmp.3 = call i32 @qux( )               ; <i32> [#uses=0]
 
13
        br label %endif
 
14
endif:          ; preds = %then, %entry
 
15
        %R = phi i32 [ 123, %entry ], [ 12312, %then ]          ; <i32> [#uses=1]
 
16
        ;; stuff to disable tail duplication
 
17
        call i32 @qux( )                ; <i32>:0 [#uses=0]
 
18
        call i32 @qux( )                ; <i32>:1 [#uses=0]
 
19
        call i32 @qux( )                ; <i32>:2 [#uses=0]
 
20
        call i32 @qux( )                ; <i32>:3 [#uses=0]
 
21
        call i32 @qux( )                ; <i32>:4 [#uses=0]
 
22
        call i32 @qux( )                ; <i32>:5 [#uses=0]
 
23
        call i32 @qux( )                ; <i32>:6 [#uses=0]
 
24
        ret i32 %R
 
25
}
 
26
 
 
27
declare i32 @qux()