diff options
author | Chris Lattner <sabre@nondot.org> | 2009-12-22 06:07:30 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2009-12-22 06:07:30 +0000 |
commit | 1a0e7081c3e94ae69f2768465da34a3dceaaa5f6 (patch) | |
tree | 981d4fe13836189cc2a2cfc4a43baac9d5a09a6e /test/Transforms | |
parent | 42385b03aa719aec326a6236b9310298b424c865 (diff) | |
download | external_llvm-1a0e7081c3e94ae69f2768465da34a3dceaaa5f6.zip external_llvm-1a0e7081c3e94ae69f2768465da34a3dceaaa5f6.tar.gz external_llvm-1a0e7081c3e94ae69f2768465da34a3dceaaa5f6.tar.bz2 |
Implement PR5795 by merging duplicated return blocks. This could go further
by merging all returns in a function into a single one, but simplifycfg
currently likes to duplicate the return (an unfortunate choice!)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91890 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Transforms')
-rw-r--r-- | test/Transforms/SimplifyCFG/basictest.ll | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/test/Transforms/SimplifyCFG/basictest.ll b/test/Transforms/SimplifyCFG/basictest.ll index d0e4754..83a9fa7 100644 --- a/test/Transforms/SimplifyCFG/basictest.ll +++ b/test/Transforms/SimplifyCFG/basictest.ll @@ -38,3 +38,22 @@ return: @test4g = global i8* blockaddress(@test4, %return) +; PR5795 +define void @test5(i32 %A) { + switch i32 %A, label %return [ + i32 2, label %bb + i32 10, label %bb1 + ] + +bb: ; preds = %entry + ret void + +bb1: ; preds = %entry + ret void + +return: ; preds = %entry + ret void +; CHECK: @test5 +; CHECK-NEXT: bb: +; CHECK-NEXT: ret void +} |