aboutsummaryrefslogtreecommitdiffstats
path: root/test/Transforms/CorrelatedExprs/branchtest.ll
blob: 591cede4ea48fa179012ab97858a6fb7c0d3052d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
; RUN: echo %s

implementation

declare void %foo(int)

void %test(int %A) {
bb1:                                    ;[#uses=0]
        %cond212 = setgt int %A, 9              ; <bool> [#uses=1]
        br bool %cond212, label %REMOVEbb3, label %bb2

bb2:                                    ;[#uses=1]
        call void %foo( int 123 )
        br label %REMOVEbb3

REMOVEbb3:                                    ;[#uses=2]
        %cond217 = setle int %A, 9            ; <bool> [#uses=1]
        br bool %cond217, label %REMOVEbb5, label %bb4

bb4:                                    ;[#uses=1]
        call void %foo( int 234 )
        br label %REMOVEbb5

REMOVEbb5:                                    ;[#uses=2]
        %cond222 = setgt int %A, 9             ; <bool> [#uses=1]
        br bool %cond222, label %bb7, label %REMOVEbb6

REMOVEbb6:                                    ;[#uses=1]
        call void %foo( int 456 )
        br label %bb7

bb7:                                    ;[#uses=2]
        ret void
}