summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorNick Lewycky <nicholas@mxc.ca>2010-01-23 19:19:34 +0000
committerNick Lewycky <nicholas@mxc.ca>2010-01-23 19:19:34 +0000
commitdbeecede809c1bffb016e48674622c5e8cb75a0c (patch)
tree556c6a94a4086d041b146f7c1938a9adef9b1424 /test
parent2dd7657a5b063e6f77c34f418b7e23654b6fe4a0 (diff)
downloadllvm-dbeecede809c1bffb016e48674622c5e8cb75a0c.tar.gz
llvm-dbeecede809c1bffb016e48674622c5e8cb75a0c.tar.bz2
llvm-dbeecede809c1bffb016e48674622c5e8cb75a0c.tar.xz
Teach DAE that even though it can't modify the function signature of an
externally visible function, it can still find all callers of it and replace the parameters to a dead argument with undef. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94322 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r--test/Transforms/DeadArgElim/deadexternal.ll12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/Transforms/DeadArgElim/deadexternal.ll b/test/Transforms/DeadArgElim/deadexternal.ll
new file mode 100644
index 0000000000..84341781da
--- /dev/null
+++ b/test/Transforms/DeadArgElim/deadexternal.ll
@@ -0,0 +1,12 @@
+; RUN: opt -deadargelim -S %s | FileCheck %s
+
+define void @test(i32) {
+ ret void
+}
+
+define void @foo() {
+ call void @test(i32 0)
+ ret void
+; CHECK: @foo
+; CHECK: i32 undef
+}