Add polly tests to configure file.
[llvm-testsuite.git] / TEST.beta-compare.Makefile
blob94d2c214b2200d963a978a54cb3734dbc33aa449
1 ##===- TEST.beta-compare.Makefile --------------------------*- Makefile -*-===##
3 # This test runs llc and llc-beta and generates numbers to compare their static
4 # values produced by -stats.
6 ##===----------------------------------------------------------------------===##
8 LLC_OPTS = $(LLCFLAGS) -o=/dev/null -stats -time-passes
9 CURDIR  := $(shell cd .; pwd)
10 PROGDIR := $(PROJ_SRC_ROOT)
11 RELDIR  := $(subst $(PROGDIR),,$(CURDIR))
13 $(PROGRAMS_TO_TEST:%=Output/%.$(TEST).llc-info.txt): \
14 Output/%.$(TEST).llc-info.txt: Output/%.llvm.bc $(LLC)
15         - $(LLC) $(LLC_OPTS) $< -info-output-file=$@
17 $(PROGRAMS_TO_TEST:%=Output/%.$(TEST).llc-beta-info.txt): \
18 Output/%.$(TEST).llc-beta-info.txt: Output/%.llvm.bc $(LLC)
19         - $(LLC) $(LLC_OPTS) $(LLCBETAOPTION) $< -info-output-file=$@
22 $(PROGRAMS_TO_TEST:%=Output/%.$(TEST).report.txt): \
23 Output/%.$(TEST).report.txt: Output/%.$(TEST).llc-info.txt Output/%.$(TEST).llc-beta-info.txt
24         $(VERB) $(RM) -f $@
25         @echo "---------------------------------------------------------------" >> $@
26         @echo ">>> ========= '$(RELDIR)/$*' Program" >> $@
27         @echo "---------------------------------------------------------------" >> $@
28         -@printf "LLC: " >> $@
29         -grep 'Number of machine instrs printed' Output/$*.$(TEST).llc-info.txt >> $@
30         -@printf "LLCBETA: " >> $@
31         -grep 'Number of machine instrs printed' Output/$*.$(TEST).llc-beta-info.txt >> $@
33 $(PROGRAMS_TO_TEST:%=test.$(TEST).%): \
34 test.$(TEST).%: Output/%.$(TEST).report.txt
35         @cat $<
37 # Define REPORT_DEPENDENCIES so that the report is regenerated if llc changes
39 REPORT_DEPENDENCIES := $(LLC)