Add a 'test legaliser' filetest command.

This test command sends each function through legalize_function() and
then filecheck.
This commit is contained in:
Jakob Stoklund Olesen
2016-09-21 13:32:46 -07:00
parent ce0da25ce0
commit 51bcc78cea
4 changed files with 68 additions and 1 deletions

View File

@@ -0,0 +1,19 @@
test legalizer
isa riscv supports_m=1
function int32(i32, i32) {
ebb0(v1: i32, v2: i32):
v10 = iadd v1, v2
; check: [R#0c]
; sameln: $v10 = iadd
v11 = isub v1, v2
; check: [R#200c]
; sameln: $v11 = isub
v12 = imul v1, v2
; check: [R#10c]
; sameln: $v12 = imul
return
}