diff options
author | Sean Silva <chisophugis@gmail.com> | 2016-07-06 19:05:41 +0000 |
---|---|---|
committer | Sean Silva <chisophugis@gmail.com> | 2016-07-06 19:05:41 +0000 |
commit | f50d4b6cdcbe0e8f20275bc040018bfb1d593eff (patch) | |
tree | 42b167ec0fca50b7f2e72d1917ef1193ff334f97 /llvm/test/Transforms | |
parent | f16acbd2f983adaa285f6d38c8a4302ebfc64c19 (diff) | |
download | bcm5719-llvm-f50d4b6cdcbe0e8f20275bc040018bfb1d593eff.tar.gz bcm5719-llvm-f50d4b6cdcbe0e8f20275bc040018bfb1d593eff.zip |
Work around PR28400 a bit harder.
We were still crashing in the "no change" case because LVI was not
getting invalidated.
See the thread "Should analyses be able to hold AssertingVH to IR?
(related to PR28400)" for more discussion.
llvm-svn: 274656
Diffstat (limited to 'llvm/test/Transforms')
-rw-r--r-- | llvm/test/Transforms/JumpThreading/crash-assertingvh.ll | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/llvm/test/Transforms/JumpThreading/crash-assertingvh.ll b/llvm/test/Transforms/JumpThreading/crash-assertingvh.ll new file mode 100644 index 00000000000..e7843199223 --- /dev/null +++ b/llvm/test/Transforms/JumpThreading/crash-assertingvh.ll @@ -0,0 +1,19 @@ +; RUN: opt -disable-output < %s -passes='module(function(jump-threading),globaldce)' + +target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128" +target triple = "x86_64-unknown-linux-gnu" + +declare i32 @bar() + +define internal i32 @foo() { +entry: + %call4 = call i32 @bar() + %cmp5 = icmp eq i32 %call4, 0 + br i1 %cmp5, label %if.then6, label %if.end8 + +if.then6: + ret i32 0 + +if.end8: + ret i32 1 +} |