diff options
| author | Benjamin Kramer <benny.kra@googlemail.com> | 2012-09-02 11:57:22 +0000 |
|---|---|---|
| committer | Benjamin Kramer <benny.kra@googlemail.com> | 2012-09-02 11:57:22 +0000 |
| commit | 599a4bb6ea6d6a91ee5d0af0a340e5f3dafa3be8 (patch) | |
| tree | 7e9a4295a3bf8abf573086bebebc4f6739089c06 /llvm/test/Transforms/LoopRotate | |
| parent | b7f1852140355a8e8ba7a7958255fe615dc86693 (diff) | |
| download | bcm5719-llvm-599a4bb6ea6d6a91ee5d0af0a340e5f3dafa3be8.tar.gz bcm5719-llvm-599a4bb6ea6d6a91ee5d0af0a340e5f3dafa3be8.zip | |
LoopRotation: Make the brute force DomTree update more brute force.
We update until we hit a fixpoint. This is probably slow but also
slightly simplifies the code. It should also fix the occasional
invalid domtrees observed when building with expensive checking.
I couldn't find a case where this had a measurable slowdown, but
if someone finds a pathological case where it does we may have
to find a cleverer way of updating dominators here.
Thanks to Duncan for the test case.
llvm-svn: 163091
Diffstat (limited to 'llvm/test/Transforms/LoopRotate')
| -rw-r--r-- | llvm/test/Transforms/LoopRotate/multiple-exits.ll | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/llvm/test/Transforms/LoopRotate/multiple-exits.ll b/llvm/test/Transforms/LoopRotate/multiple-exits.ll index 066b7e45d97..675d71f60da 100644 --- a/llvm/test/Transforms/LoopRotate/multiple-exits.ll +++ b/llvm/test/Transforms/LoopRotate/multiple-exits.ll @@ -198,3 +198,39 @@ declare i32 @llvm.eh.typeid.for(i8*) nounwind readnone declare i8* @__cxa_begin_catch(i8*) declare void @__cxa_end_catch() + +define void @test4() nounwind uwtable { +entry: + br label %"7" + +"3": ; preds = %"7" + br i1 undef, label %"31", label %"4" + +"4": ; preds = %"3" + %. = select i1 undef, float 0x3F50624DE0000000, float undef + %0 = add i32 %1, 1 + br label %"7" + +"7": ; preds = %"4", %entry + %1 = phi i32 [ %0, %"4" ], [ 0, %entry ] + %2 = icmp slt i32 %1, 100 + br i1 %2, label %"3", label %"8" + +"8": ; preds = %"7" + br i1 undef, label %"9", label %"31" + +"9": ; preds = %"8" + br label %"33" + +"27": ; preds = %"31" + unreachable + +"31": ; preds = %"8", %"3" + br i1 undef, label %"27", label %"32" + +"32": ; preds = %"31" + br label %"33" + +"33": ; preds = %"32", %"9" + ret void +} |

