Files
wasmtime/cranelift/filetests/filetests/verifier/constant.clif
Andrew Brown fa35d88878 Verify that constant values are the correct size
Since we now allow constants of any size, we have to verify that `vconst` (currently the only user of the constant pool) is accessing constants that match its controlling type.
2020-04-17 11:59:47 -07:00

10 lines
252 B
Plaintext

test verifier
set enable_simd
function %incorrect_constant_size() {
const13 = [1 2 3 4 5] ; this constant has 5 bytes
block0:
v0 = vconst.i32x4 const13 ; error: The instruction expects const13 to have a size of 16 bytes but it has 5
return
}