diff options
author | Nick Lewycky <nicholas@mxc.ca> | 2011-08-02 21:19:27 +0000 |
---|---|---|
committer | Nick Lewycky <nicholas@mxc.ca> | 2011-08-02 21:19:27 +0000 |
commit | 3e69c13c301acee99c8bde7e692777bf856a6362 (patch) | |
tree | 73217bfa6048a7be0f53b89f36111650c3d25207 /test | |
parent | 11066fb9374d80a1564d9bbcc93ccc2402fb1f97 (diff) | |
download | external_llvm-3e69c13c301acee99c8bde7e692777bf856a6362.zip external_llvm-3e69c13c301acee99c8bde7e692777bf856a6362.tar.gz external_llvm-3e69c13c301acee99c8bde7e692777bf856a6362.tar.bz2 |
Lifetime intrinsics on undef are dead.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136722 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r-- | test/Transforms/InstCombine/deadcode.ll | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/test/Transforms/InstCombine/deadcode.ll b/test/Transforms/InstCombine/deadcode.ll index 52af0ef..7c7f1ab 100644 --- a/test/Transforms/InstCombine/deadcode.ll +++ b/test/Transforms/InstCombine/deadcode.ll @@ -1,5 +1,5 @@ ; RUN: opt < %s -instcombine -S | grep {ret i32 %A} -; RUN: opt < %s -die -S | not grep call.*llvm.stacksave +; RUN: opt < %s -die -S | not grep call.*llvm define i32 @test(i32 %A) { %X = or i1 false, false @@ -22,3 +22,12 @@ define i32* @test2(i32 %width) { declare i8* @llvm.stacksave() +declare void @llvm.lifetime.start(i64, i8*) +declare void @llvm.lifetime.end(i64, i8*) + +define void @test3() { + call void @llvm.lifetime.start(i64 -1, i8* undef) + call void @llvm.lifetime.end(i64 -1, i8* undef) + ret void +} + |