summaryrefslogtreecommitdiffstats
path: root/llvm/test/Analysis/ScalarEvolution/unreachable-code.ll
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2010-03-09 23:46:50 +0000
committerDan Gohman <gohman@apple.com>2010-03-09 23:46:50 +0000
commit69451a09500672a49ca3614137c6aca814920f90 (patch)
tree8d1ec3d9eb4bc3f13d26c42217c8bb7ebffef3aa /llvm/test/Analysis/ScalarEvolution/unreachable-code.ll
parent3d72a678de75806bf79e16b9e7dbd0ca5429c3c4 (diff)
downloadbcm5719-llvm-69451a09500672a49ca3614137c6aca814920f90.tar.gz
bcm5719-llvm-69451a09500672a49ca3614137c6aca814920f90.zip
Avoid analyzing instructions in blocks not reachable from the entry block.
They are lots of trouble, and they don't matter. This fixes PR6559. llvm-svn: 98103
Diffstat (limited to 'llvm/test/Analysis/ScalarEvolution/unreachable-code.ll')
-rw-r--r--llvm/test/Analysis/ScalarEvolution/unreachable-code.ll13
1 files changed, 13 insertions, 0 deletions
diff --git a/llvm/test/Analysis/ScalarEvolution/unreachable-code.ll b/llvm/test/Analysis/ScalarEvolution/unreachable-code.ll
new file mode 100644
index 00000000000..51d93981800
--- /dev/null
+++ b/llvm/test/Analysis/ScalarEvolution/unreachable-code.ll
@@ -0,0 +1,13 @@
+; RUN: opt < %s -analyze -scalar-evolution | FileCheck %s
+
+; CHECK: %t = add i64 %t, 1
+; CHECK: --> %t
+
+define void @foo() {
+entry:
+ ret void
+
+dead:
+ %t = add i64 %t, 1
+ ret void
+}
OpenPOWER on IntegriCloud