aboutsummaryrefslogtreecommitdiff
path: root/test/kr-function-argument-promotion.qbe
diff options
context:
space:
mode:
Diffstat (limited to 'test/kr-function-argument-promotion.qbe')
-rw-r--r--test/kr-function-argument-promotion.qbe18
1 files changed, 18 insertions, 0 deletions
diff --git a/test/kr-function-argument-promotion.qbe b/test/kr-function-argument-promotion.qbe
new file mode 100644
index 0000000..6d2f2b8
--- /dev/null
+++ b/test/kr-function-argument-promotion.qbe
@@ -0,0 +1,18 @@
+export
+function w $f(w %.1) {
+@start.1
+ %.2 =w extub %.1
+ %.3 =l alloc4 1
+ storeb %.2, %.3
+@body.2
+ %.4 =w loadub %.3
+ %.5 =w extub %.4
+ ret %.5
+}
+export
+function w $main() {
+@start.3
+@body.4
+ %.1 =w call $f(w 256)
+ ret %.1
+}