Add a verifier pass for CPU flags.

Only one CPU flags value can be live at a time, and some instructions
clobber the flags.
This commit is contained in:
Jakob Stoklund Olesen
2017-10-18 14:03:46 -07:00
parent c3446ee472
commit b948de1693
7 changed files with 259 additions and 7 deletions

View File

@@ -16,6 +16,6 @@ function %RV32I(i32 link [%x1]) -> i32 link [%x1] {
ebb0(v9999: i32):
v1 = iconst.i32 1
v2 = iconst.i32 2
[R#0,-] v3 = iadd v1, v2 ; error: Instruction encoding R#00 doesn't match any possibilities
[R#0,-] v3 = iadd v1, v2 ; error: encoding R#00 should be R#0c
return v9999
}