Permalink
Browse files

[tests] more

  • Loading branch information...
raphael-proust committed Jun 26, 2012
1 parent 53550da commit d72d238c18b86d64d573af3759018af1cecb7794
Showing with 31 additions and 8 deletions.
  1. +5 −8 tests/Makefile
  2. +26 −0 tests/calls_simpl.c
View
@@ -24,7 +24,8 @@ CS= \
vars.c \
calls.c \
calls_if.c \
- calls_if_const.c
+ calls_if_const.c \
+ calls_simpl.c
HSS= \
fibonacci_pat.hs \
@@ -49,18 +50,14 @@ OPTS= \
loop-rotate loop-simplify loop-unroll loop-unswitch \
mergereturn reg2mem sccp sink tailcallelim
-OPTS1= gvn mergereturn sccp indvars instcombine
-OPTS2= gvn mergereturn sccp indvars instcombine
+OPTS1= gvn sccp indvars instcombine inline adce
+OPTS2= gvn sccp indvars instcombine inline adce
all: run
-run: lls runner
+run: lls
../src/run.native $(LLS) -- $(OPTS1) -- $(OPTS2)
-runner:
- make -C ../src depend
- make -C ../src native
-
bcs: $(BCS)
lls: $(LLS)
View
@@ -0,0 +1,26 @@
+int baz(int a) {
+ return (a + a);
+}
+
+int bar(int a) {
+ return (a * a);
+}
+
+int foo(int a) {
+ return 0;
+}
+
+int entry (int b, int n, int m, int x, int y){
+ int res = 0;
+ if(b) {
+ res = foo(n);
+ res += bar(m);
+ res += baz(b);
+ } else {
+ res = foo(x);
+ res += bar(y);
+ res += baz(b);
+ }
+ return res;
+}
+

0 comments on commit d72d238

Please sign in to comment.