diff options
author | Dan Gohman <gohman@apple.com> | 2010-06-28 21:16:52 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2010-06-28 21:16:52 +0000 |
commit | 50f424c3d079d4774bb323de1e0b77cf4627be69 (patch) | |
tree | cf16075a9b993fb4d2ae431eebba08aa00e1a5a6 /test/Analysis | |
parent | 08baddbc0708d6965b72b40aa3c1f40b56a31835 (diff) | |
download | external_llvm-50f424c3d079d4774bb323de1e0b77cf4627be69.zip external_llvm-50f424c3d079d4774bb323de1e0b77cf4627be69.tar.gz external_llvm-50f424c3d079d4774bb323de1e0b77cf4627be69.tar.bz2 |
Fix Value::stripPointerCasts and BasicAA to avoid trouble on
code in unreachable blocks, which have have use-def cycles.
This fixes PR7514.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107071 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Analysis')
-rw-r--r-- | test/Analysis/BasicAA/unreachable-block.ll | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/test/Analysis/BasicAA/unreachable-block.ll b/test/Analysis/BasicAA/unreachable-block.ll new file mode 100644 index 0000000..3382188 --- /dev/null +++ b/test/Analysis/BasicAA/unreachable-block.ll @@ -0,0 +1,16 @@ +; RUN: opt -aa-eval -disable-output < %s >& /dev/null + +; BasicAA shouldn't infinitely recurse on the use-def cycles in +; unreachable code. + +define void @func_2() nounwind { +entry: + unreachable + +bb: + %t = select i1 undef, i32* %t, i32* undef + %p = select i1 undef, i32* %p, i32* %p + %q = select i1 undef, i32* undef, i32* %p + %a = getelementptr i8* %a, i32 0 + unreachable +} |