diff options
author | Dan Gohman <gohman@apple.com> | 2009-09-28 18:40:27 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2009-09-28 18:40:27 +0000 |
commit | c60e0bec11ab791968de8959794768ad45fccd4d (patch) | |
tree | c9e72ff07ec6252f542b7cf1cd27c11d72c1c61d /test/Transforms/LoopRotate | |
parent | 23aefe5e9232b973468680b673a2f14fc86d40a4 (diff) | |
download | llvm-c60e0bec11ab791968de8959794768ad45fccd4d.tar.gz llvm-c60e0bec11ab791968de8959794768ad45fccd4d.tar.bz2 llvm-c60e0bec11ab791968de8959794768ad45fccd4d.tar.xz |
Add a testcase to help test analysis preservation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83002 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Transforms/LoopRotate')
-rw-r--r-- | test/Transforms/LoopRotate/preserve-scev.ll | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/test/Transforms/LoopRotate/preserve-scev.ll b/test/Transforms/LoopRotate/preserve-scev.ll new file mode 100644 index 0000000000..9eedaa49c0 --- /dev/null +++ b/test/Transforms/LoopRotate/preserve-scev.ll @@ -0,0 +1,47 @@ +; RUN: opt < %s -loop-rotate -loop-reduce -disable-output + +define fastcc void @foo() nounwind { +BB: + br label %BB1 + +BB1: ; preds = %BB19, %BB + br label %BB4 + +BB2: ; preds = %BB4 + %tmp = bitcast i32 undef to i32 ; <i32> [#uses=1] + br label %BB4 + +BB4: ; preds = %BB3, %BB1 + %tmp5 = phi i32 [ undef, %BB1 ], [ %tmp, %BB2 ] ; <i32> [#uses=1] + br i1 false, label %BB8, label %BB2 + +BB8: ; preds = %BB6 + %tmp7 = bitcast i32 %tmp5 to i32 ; <i32> [#uses=2] + br i1 false, label %BB9, label %BB13 + +BB9: ; preds = %BB12, %BB8 + %tmp10 = phi i32 [ %tmp11, %BB12 ], [ %tmp7, %BB8 ] ; <i32> [#uses=2] + %tmp11 = add i32 %tmp10, 1 ; <i32> [#uses=1] + br label %BB12 + +BB12: ; preds = %BB9 + br i1 false, label %BB9, label %BB17 + +BB13: ; preds = %BB15, %BB8 + %tmp14 = phi i32 [ %tmp16, %BB15 ], [ %tmp7, %BB8 ] ; <i32> [#uses=1] + br label %BB15 + +BB15: ; preds = %BB13 + %tmp16 = add i32 %tmp14, -1 ; <i32> [#uses=1] + br i1 false, label %BB13, label %BB18 + +BB17: ; preds = %BB12 + br label %BB19 + +BB18: ; preds = %BB15 + br label %BB19 + +BB19: ; preds = %BB18, %BB17 + %tmp20 = phi i32 [ %tmp10, %BB17 ], [ undef, %BB18 ] ; <i32> [#uses=0] + br label %BB1 +} |