diff options
author | Chris Lattner <sabre@nondot.org> | 2003-08-17 19:37:57 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2003-08-17 19:37:57 +0000 |
commit | f0cd835784daf390e730f1c4a9582ff0c517e57e (patch) | |
tree | 62d460f7419e26fa6b1e317dc4b513ecbca8b1de /test | |
parent | 342a9d1464ed3483b45b0ca47c0b130ba080c938 (diff) | |
download | external_llvm-f0cd835784daf390e730f1c4a9582ff0c517e57e.zip external_llvm-f0cd835784daf390e730f1c4a9582ff0c517e57e.tar.gz external_llvm-f0cd835784daf390e730f1c4a9582ff0c517e57e.tar.bz2 |
New testcase
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7920 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r-- | test/Transforms/SimplifyCFG/2003-08-17-BranchFoldOrdering.ll | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/test/Transforms/SimplifyCFG/2003-08-17-BranchFoldOrdering.ll b/test/Transforms/SimplifyCFG/2003-08-17-BranchFoldOrdering.ll new file mode 100644 index 0000000..25a4d56 --- /dev/null +++ b/test/Transforms/SimplifyCFG/2003-08-17-BranchFoldOrdering.ll @@ -0,0 +1,24 @@ +; This test checks to make sure that 'br X, Dest, Dest' is folded into +; 'br Dest'. This can only happen after the 'Z' block is eliminated. This is +; due to the fact that the SimplifyCFG function does not use +; the ConstantFoldTerminator function. + +; RUN: as < %s | opt -simplifycfg | dis | not grep 'br bool %c2' + +declare void %noop() + +int %test(bool %c1, bool %c2) { + call void %noop() + br bool %c1, label %A, label %Y +A: + call void %noop() + br bool %c2, label %Z, label %X ; Can be converted to unconditional br +Z: + br label %X +X: + call void %noop() + ret int 0 +Y: + call void %noop() + br label %X +} |