diff options
author | Eli Friedman <eli.friedman@gmail.com> | 2012-03-13 01:06:07 +0000 |
---|---|---|
committer | Eli Friedman <eli.friedman@gmail.com> | 2012-03-13 01:06:07 +0000 |
commit | 5b8f0ddc7e5bc3c7ffe1b2226a8316796f18b90e (patch) | |
tree | 43e3feba5e504c673b7d9462fea2cb4a571cc759 /test | |
parent | 90c14fcb7ea3436a8b3053f8a9aa529c03011d34 (diff) | |
download | llvm-5b8f0ddc7e5bc3c7ffe1b2226a8316796f18b90e.tar.gz llvm-5b8f0ddc7e5bc3c7ffe1b2226a8316796f18b90e.tar.bz2 llvm-5b8f0ddc7e5bc3c7ffe1b2226a8316796f18b90e.tar.xz |
Fix regression from r151466: an we can't replace uses of an instruction reachable from the entry block with uses of an instruction not reachable from the entry block. PR12231.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152595 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r-- | test/Transforms/EarlyCSE/instsimplify-dom.ll | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/test/Transforms/EarlyCSE/instsimplify-dom.ll b/test/Transforms/EarlyCSE/instsimplify-dom.ll new file mode 100644 index 0000000000..36dffec1c6 --- /dev/null +++ b/test/Transforms/EarlyCSE/instsimplify-dom.ll @@ -0,0 +1,19 @@ +; RUN: opt -early-cse -S < %s | FileCheck %s +; PR12231 + +declare i32 @f() + +define i32 @fn() { +entry: + br label %lbl_1215 + +lbl_1215: + %ins34 = phi i32 [ %ins35, %xxx ], [ undef, %entry ] + ret i32 %ins34 + +xxx: + %ins35 = call i32 @f() + br label %lbl_1215 +} + +; CHECK: define i32 @fn |