mirror of
https://github.com/RPCS3/llvm.git
synced 2025-04-02 21:31:41 +00:00
Basic test of the inlinr
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2767 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
578cf90040
commit
f49764070d
12
test/Transforms/Inline/Makefile
Normal file
12
test/Transforms/Inline/Makefile
Normal file
@ -0,0 +1,12 @@
|
||||
|
||||
LEVEL = ../../../..
|
||||
include $(LEVEL)/test/Makefile.tests
|
||||
|
||||
TESTS := $(wildcard *.ll)
|
||||
|
||||
all:: $(addprefix Output/, $(TESTS:%.ll=%.ibc))
|
||||
|
||||
Output/%.ibc: %.ll Output/.dir $(LOPT)
|
||||
($(LAS) < $< | $(LOPT) -inline -q -f -o $@) || \
|
||||
( rm -f $@; $(FAILURE) $@ )
|
||||
|
11
test/Transforms/Inline/basictest.ll
Normal file
11
test/Transforms/Inline/basictest.ll
Normal file
@ -0,0 +1,11 @@
|
||||
|
||||
|
||||
int %func(int %i) {
|
||||
ret int %i
|
||||
}
|
||||
|
||||
int %main(int %argc) {
|
||||
%X = call int %func(int 7)
|
||||
%Y = add int %X, %argc
|
||||
ret int %Y
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user