diff options
author | Nick Lewycky <nicholas@mxc.ca> | 2011-11-14 22:49:42 +0000 |
---|---|---|
committer | Nick Lewycky <nicholas@mxc.ca> | 2011-11-14 22:49:42 +0000 |
commit | 88990248d3bfb2f265fcf27f8a032ac0eb14d09f (patch) | |
tree | d6733913e0b830749407746b87bf62df6601c79c /test | |
parent | e91da1baa137e3e20a7878030a3b8d5dc5b296f3 (diff) | |
download | external_llvm-88990248d3bfb2f265fcf27f8a032ac0eb14d09f.zip external_llvm-88990248d3bfb2f265fcf27f8a032ac0eb14d09f.tar.gz external_llvm-88990248d3bfb2f265fcf27f8a032ac0eb14d09f.tar.bz2 |
Refactor capture tracking (which already had a couple flags for whether returns
and stores capture) to permit the caller to see each capture point and decide
whether to continue looking.
Use this inside memdep to do an analysis that basicaa won't do. This lets us
solve another devirtualization case, fixing PR8908!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@144580 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r-- | test/Transforms/GVN/rle.ll | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/test/Transforms/GVN/rle.ll b/test/Transforms/GVN/rle.ll index 2f0d2eb..47ccd85 100644 --- a/test/Transforms/GVN/rle.ll +++ b/test/Transforms/GVN/rle.ll @@ -642,3 +642,28 @@ declare void @llvm.memset.p0i8.i64(i8* nocapture, i8, i64, i32, i1) nounwind declare void @llvm.memcpy.p0i8.p0i8.i64(i8* nocapture, i8* nocapture, i64, i32, i1) nounwind +;;===----------------------------------------------------------------------===;; +;; Load -> Store dependency which isn't interfered with by a call that happens +;; before the pointer was captured. +;;===----------------------------------------------------------------------===;; + +%class.X = type { [8 x i8] } + +@_ZTV1X = weak_odr constant [5 x i8*] zeroinitializer +@_ZTV1Y = weak_odr constant [5 x i8*] zeroinitializer + +declare void @use() +declare void @use3(i8***, i8**) + +; PR8908 +define void @test_escape1() nounwind { + %x = alloca i8**, align 8 + store i8** getelementptr inbounds ([5 x i8*]* @_ZTV1X, i64 0, i64 2), i8*** %x, align 8 + call void @use() nounwind + %DEAD = load i8*** %x, align 8 + call void @use3(i8*** %x, i8** %DEAD) nounwind + ret void +; CHECK: test_escape1 +; CHECK-NOT: DEAD +; CHECK: ret +} |