Add a 'regalloc' filetest command.

Run functions through the register allocator, and then filecheck.
This commit is contained in:
Jakob Stoklund Olesen
2017-02-17 17:07:08 -08:00
parent ccda0a192c
commit 4ba5cfeed3
4 changed files with 88 additions and 4 deletions

View File

@@ -0,0 +1,12 @@
test regalloc
; We can add more ISAs once they have defined encodings.
isa riscv
function add(i32, i32) {
ebb0(v1: i32, v2: i32):
v3 = iadd v1, v2
; check: [R#0c,%x0]
; sameln: iadd
return_reg v3
}