diff options
Diffstat (limited to 'test/inlinetest.ll')
-rw-r--r-- | test/inlinetest.ll | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/test/inlinetest.ll b/test/inlinetest.ll new file mode 100644 index 0000000..6db3076 --- /dev/null +++ b/test/inlinetest.ll @@ -0,0 +1,27 @@ +implementation + +int "FuncToInline"() +begin + %x = add int 1, 1 ; Instrs can be const prop'd away + %y = sub int -1, 1 + %z = add int %x, %y + ret int %z ; Should equal %0 +end + +int "FuncToInlineInto"(int %arg) ; Instrs can be const prop'd away +begin + %x = add int %arg, 1 + %y = sub int 1, -1 + %p = call int() %FuncToInline() + %z = add int %x, %y + %q = add int %p, %z + + ret int %q +end + +int "FTIITII"() +begin + %z = call int(int) %FuncToInlineInto(int 1) + ret int %z +end + |