1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-21 03:53:04 +02:00
llvm-mirror/test/Transforms/IndVarSimplify/loop_evaluate_1.ll
Dan Gohman 205b641954 Change tests from "opt %s" to "opt < %s" so that opt doesn't see the
input filename so that opt doesn't print the input filename in the
output so that grep lines in the tests don't unintentionally match
strings in the input filename.

llvm-svn: 81537
2009-09-11 18:01:28 +00:00

22 lines
826 B
LLVM

; RUN: opt < %s -indvars -loop-deletion -simplifycfg -S | not grep br
;
; Testcase distilled from 256.bzip2
define i32 @main() {
entry:
br label %loopentry
loopentry: ; preds = %loopentry, %entry
%indvar1 = phi i32 [ 0, %entry ], [ %indvar.next2, %loopentry ] ; <i32> [#uses=1]
%h.0 = phi i32 [ %tmp.2, %loopentry ], [ 4, %entry ] ; <i32> [#uses=1]
%tmp.1 = mul i32 %h.0, 3 ; <i32> [#uses=1]
%tmp.2 = add i32 %tmp.1, 1 ; <i32> [#uses=2]
%indvar.next2 = add i32 %indvar1, 1 ; <i32> [#uses=2]
%exitcond3 = icmp ne i32 %indvar.next2, 4 ; <i1> [#uses=1]
br i1 %exitcond3, label %loopentry, label %loopexit
loopexit: ; preds = %loopentry
ret i32 %tmp.2
}