mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-25 13:24:46 +00:00
Rename IndVarsSimplify to IndVarSimplify, to be consistent with
the name used in the code that these tests are for. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64624 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
21
test/Transforms/IndVarSimplify/loop_evaluate_1.ll
Normal file
21
test/Transforms/IndVarSimplify/loop_evaluate_1.ll
Normal file
@@ -0,0 +1,21 @@
|
||||
; RUN: llvm-as < %s | opt -indvars -loop-deletion -simplifycfg | llvm-dis | 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
|
||||
}
|
||||
|
Reference in New Issue
Block a user