mirror of
https://github.com/RPCS3/llvm.git
synced 2024-12-27 14:45:50 +00:00
69ccadd753
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32115 91177308-0d34-0410-b5e6-96231b3b80d8
22 lines
857 B
LLVM
22 lines
857 B
LLVM
; RUN: llvm-upgrade < %s | llvm-as | opt -indvars -adce -simplifycfg | llvm-dis | not grep br
|
|
;
|
|
; Testcase distilled from 256.bzip2
|
|
|
|
int %main() {
|
|
entry:
|
|
br label %loopentry
|
|
|
|
loopentry: ; preds = %entry, %loopentry
|
|
%indvar1 = phi uint [ 0, %entry ], [ %indvar.next2, %loopentry ] ; <uint> [#uses=1]
|
|
%h.0 = phi int [ %tmp.2, %loopentry ], [ 4, %entry ] ; <int> [#uses=1]
|
|
%tmp.1 = mul int %h.0, 3 ; <int> [#uses=1]
|
|
%tmp.2 = add int %tmp.1, 1 ; <int> [#uses=1]
|
|
%indvar.next2 = add uint %indvar1, 1 ; <uint> [#uses=2]
|
|
%exitcond3 = setne uint %indvar.next2, 4 ; <bool> [#uses=1]
|
|
br bool %exitcond3, label %loopentry, label %loopexit
|
|
|
|
loopexit: ; preds = %loopentry
|
|
ret int %tmp.2
|
|
}
|
|
|