x64: Fix sinking loads band/bor/bxor#13071
x64: Fix sinking loads band/bor/bxor#13071alexcrichton merged 1 commit intobytecodealliance:mainfrom
Conversation
This commit fixes the x64 backend in Cranelift when sinking loads into band/bor/bxor instructions. If this happens for scalar types like `f32` and `f64` this means that the generated instruction will load too many bytes, similar to bytecodealliance#13011 for example. These rules aren't reachable from WebAssembly but are still good to have fixed.
theotherjimmy
left a comment
There was a problem hiding this comment.
Seems sensible to me.
fitzgen
left a comment
There was a problem hiding this comment.
This one might make sense to have wast tests for that do the operation at the end of memory, so that if our memory access is too wide, we will (incorrectly) trap.
|
Agreed! However I haven't added those here because I don't think I can insofar as wasm can't reach these rules (bitops on floats). Given that I'm going to go ahead and merge but if you know of how these are reachable from wasm @fitzgen lemme know |
I don't I was just thinking out loud |
This commit fixes the x64 backend in Cranelift when sinking loads into band/bor/bxor instructions. If this happens for scalar types like
f32andf64this means that the generated instruction will load too many bytes, similar to #13011 for example. These rules aren't reachable from WebAssembly but are still good to have fixed.