diff options
author | Chris Lattner <sabre@nondot.org> | 2008-04-28 00:19:07 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2008-04-28 00:19:07 +0000 |
commit | b2718272256fd023bbbe3e8e9616f315def43072 (patch) | |
tree | 73b75cf1d859d2bc0427aea03e85a993bccd1791 /test | |
parent | 86a23b1e5396cfd06c56027a5fb43ccb3605d7bc (diff) | |
download | external_llvm-b2718272256fd023bbbe3e8e9616f315def43072.zip external_llvm-b2718272256fd023bbbe3e8e9616f315def43072.tar.gz external_llvm-b2718272256fd023bbbe3e8e9616f315def43072.tar.bz2 |
Fix PR2256, yet another miscompilation in simplifycfg of i
multiple return values.
Bill, please pull this into Tak.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50332 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r-- | test/Transforms/SimplifyCFG/2008-04-27-MultipleReturnCrash.ll | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/test/Transforms/SimplifyCFG/2008-04-27-MultipleReturnCrash.ll b/test/Transforms/SimplifyCFG/2008-04-27-MultipleReturnCrash.ll new file mode 100644 index 0000000..a370b95 --- /dev/null +++ b/test/Transforms/SimplifyCFG/2008-04-27-MultipleReturnCrash.ll @@ -0,0 +1,30 @@ +; RUN: llvm-as < %s | opt -simplifycfg -disable-output +; PR2256 +target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128" +target triple = "x86_64-mingw32" + +define { x86_fp80, x86_fp80 } @catanl({ x86_fp80, x86_fp80 }* byval %Z, i1 %cond) nounwind { +bb: ; preds = %entry + br i1 %cond, label %bb48, label %bb40 + +bb40: ; preds = %bb + store i32 34, i32* null, align 4 + br label %bb196 + +bb48: ; preds = %bb.bb48_crit_edge, %entry.bb48_crit_edge + %tmp53 = icmp eq i32 0, 1280 ; <i1> [#uses=1] + br i1 %tmp53, label %bb56, label %bb174 + +bb56: ; preds = %bb48 + %iftmp.0.0 = select i1 false, x86_fp80 0xK3FFFC90FDAA22168C235, x86_fp80 0xKBFFFC90FDAA22168C235 ; <x86_fp80> [#uses=0] + br label %bb196 + + +bb174: ; preds = %bb144, %bb114 + %tmp191 = mul x86_fp80 0xK00000000000000000000, 0xK3FFE8000000000000000 ; <x86_fp80> [#uses=1] + br label %bb196 + +bb196: ; preds = %bb174, %bb56, %bb40 + %Res.1.0 = phi x86_fp80 [ 0xK7FFF8000000000000000, %bb40 ], [ %tmp191, %bb174 ], [ 0xK00000000000000000000, %bb56 ] ; <x86_fp80> [#uses=1] + ret x86_fp80 0xK00000000000000000000, x86_fp80 %Res.1.0 +} |