cranelift: Exclude the control type in narrower and wider (#6018)
* Don't include the control type in `narrower` or `wider` constraints * Add verifier tests for instructions that use narrower and wider
This commit is contained in:
@@ -114,13 +114,15 @@ function %bad_extend() {
|
||||
block0:
|
||||
v0 = iconst.i32 10
|
||||
v1 = uextend.i16 v0 ; error: arg 0 (v0) with type i32 failed to satisfy type set
|
||||
v2 = uextend.i32 v0 ; error: arg 0 (v0) with type i32 failed to satisfy type set
|
||||
return
|
||||
}
|
||||
|
||||
function %bad_reduce() {
|
||||
block0:
|
||||
v0 = iconst.i32 10
|
||||
v1 = ireduce.i64 v0 ; error: arg 0 (v0) with type i32 failed to satisfy type set
|
||||
v1 = ireduce.i32 v0 ; error: arg 0 (v0) with type i32 failed to satisfy type set
|
||||
v2 = ireduce.i64 v0 ; error: arg 0 (v0) with type i32 failed to satisfy type set
|
||||
return
|
||||
}
|
||||
|
||||
@@ -128,6 +130,7 @@ function %bad_fdemote() {
|
||||
block0:
|
||||
v0 = f32const 0xf.f
|
||||
v1 = fdemote.f64 v0 ; error: arg 0 (v0) with type f32 failed to satisfy type set
|
||||
v2 = fdemote.f32 v0 ; error: arg 0 (v0) with type f32 failed to satisfy type set
|
||||
return
|
||||
}
|
||||
|
||||
@@ -135,6 +138,7 @@ function %bad_fpromote() {
|
||||
block0:
|
||||
v0 = f64const 0xf.f
|
||||
v1 = fpromote.f32 v0 ; error: arg 0 (v0) with type f64 failed to satisfy type set
|
||||
v2 = fpromote.f64 v0 ; error: arg 0 (v0) with type f64 failed to satisfy type set
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user