[llvm-commits] CVS: llvm/test/Regression/Transforms/DeadArgElim/Makefile basictest.ll
Chris Lattner
lattner at cs.uiuc.edu
Mon Jun 16 07:06:06 PDT 2003
Changes in directory llvm/test/Regression/Transforms/DeadArgElim:
Makefile added (r1.1)
basictest.ll added (r1.1)
---
Log message:
New testcases for bugs and the new DAE pass
---
Diffs of the changes:
Index: llvm/test/Regression/Transforms/DeadArgElim/Makefile
diff -c /dev/null llvm/test/Regression/Transforms/DeadArgElim/Makefile:1.1
*** /dev/null Mon Jun 16 07:05:48 2003
--- llvm/test/Regression/Transforms/DeadArgElim/Makefile Mon Jun 16 07:05:38 2003
***************
*** 0 ****
--- 1,10 ----
+
+ LEVEL = ../../../..
+ include $(LEVEL)/test/Makefile.tests
+
+ TESTS := $(wildcard *.ll)
+
+ all:: $(addprefix Output/, $(TESTS:%.ll=%.ll.out))
+
+ Output/%.ll.out: %.ll Output/.dir $(LOPT)
+ -$(TESTRUNR) $<
Index: llvm/test/Regression/Transforms/DeadArgElim/basictest.ll
diff -c /dev/null llvm/test/Regression/Transforms/DeadArgElim/basictest.ll:1.1
*** /dev/null Mon Jun 16 07:05:48 2003
--- llvm/test/Regression/Transforms/DeadArgElim/basictest.ll Mon Jun 16 07:05:38 2003
***************
*** 0 ****
--- 1,27 ----
+ ; RUN: if as < %s | opt -load ~/llvm/lib/Debug/libhello.so -deadargelim | dis | grep DEADARG
+ ; RUN: then exit 1
+ ; RUN: else exit 0
+ ; RUN: fi
+
+ implementation
+
+ ; test - an obviously dead argument
+ internal int %test(int %v, int %DEADARG1, int* %p) {
+ store int %v, int* %p
+ ret int %v
+ }
+
+ ; hardertest - an argument which is only used by a call of a function with a
+ ; dead argument.
+ internal int %hardertest(int %DEADARG2) {
+ %p = alloca int
+ %V = call int %test(int 5, int %DEADARG2, int* %p)
+ ret int %V
+ }
+
+ ; evenhardertest - recursive dead argument...
+ internal void %evenhardertest(int %DEADARG3) {
+ call void %evenhardertest(int %DEADARG3)
+ ret void
+ }
+
More information about the llvm-commits
mailing list