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:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user