diff options
author | Dan Gohman <gohman@apple.com> | 2010-06-22 13:15:46 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2010-06-22 13:15:46 +0000 |
commit | 9d4588ffadfdf6c190758200b2ca69742f46d239 (patch) | |
tree | d71e08e8dc5e82bd914ba0a494da987577fb0b02 /test/Analysis | |
parent | e4acff8720b0a92d93613fef1fb47ed701ba71c5 (diff) | |
download | external_llvm-9d4588ffadfdf6c190758200b2ca69742f46d239.zip external_llvm-9d4588ffadfdf6c190758200b2ca69742f46d239.tar.gz external_llvm-9d4588ffadfdf6c190758200b2ca69742f46d239.tar.bz2 |
Allow "exhaustive" trip count evaluation on phi nodes with all
constant operands.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106537 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Analysis')
-rw-r--r-- | test/Analysis/ScalarEvolution/trip-count10.ll | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/test/Analysis/ScalarEvolution/trip-count10.ll b/test/Analysis/ScalarEvolution/trip-count10.ll index 2386cf4..546e1dc 100644 --- a/test/Analysis/ScalarEvolution/trip-count10.ll +++ b/test/Analysis/ScalarEvolution/trip-count10.ll @@ -105,3 +105,22 @@ bb2: retbb: ret void } + +; PHI nodes with all constant operands. + +; CHECK: Determining loop execution counts for: @constant_phi_operands +; CHECK: Loop %loop: backedge-taken count is 1 +; CHECK: Loop %loop: max backedge-taken count is 1 + +define void @constant_phi_operands() nounwind { +entry: + br label %loop + +loop: + %i = phi i64 [ 1, %loop ], [ 0, %entry ] + %exitcond = icmp eq i64 %i, 1 + br i1 %exitcond, label %return, label %loop + +return: + ret void +} |