summaryrefslogtreecommitdiffstats
path: root/llvm/test/Analysis
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2010-06-28 21:16:52 +0000
committerDan Gohman <gohman@apple.com>2010-06-28 21:16:52 +0000
commit7c34ece501ef170fdc77af3a6c63866d1034bbdc (patch)
tree5c670accde977f65419292480df814f9e2d6482e /llvm/test/Analysis
parent544317dfda68d8fd7c68aed9a5dca6f7a7f729e9 (diff)
downloadbcm5719-llvm-7c34ece501ef170fdc77af3a6c63866d1034bbdc.tar.gz
bcm5719-llvm-7c34ece501ef170fdc77af3a6c63866d1034bbdc.zip
Fix Value::stripPointerCasts and BasicAA to avoid trouble on
code in unreachable blocks, which have have use-def cycles. This fixes PR7514. llvm-svn: 107071
Diffstat (limited to 'llvm/test/Analysis')
-rw-r--r--llvm/test/Analysis/BasicAA/unreachable-block.ll16
1 files changed, 16 insertions, 0 deletions
diff --git a/llvm/test/Analysis/BasicAA/unreachable-block.ll b/llvm/test/Analysis/BasicAA/unreachable-block.ll
new file mode 100644
index 00000000000..3382188f4bb
--- /dev/null
+++ b/llvm/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
+}
OpenPOWER on IntegriCloud