Files
wasmtime/cranelift/codegen
Alex Crichton 7ebff82861 Optimize sign extension via shifts (#6220)
* Optimize sign extension via shifts

This commit adds egraph optimization patterns for left-shifting a value
and then right-shifting it as a form of sign extending its lower bits.
This matches the behavior of the WebAssembly `i32.extend8_s`
instruction, for example. Note that the lowering of that WebAssembly
instruction does not use shifts, but historical versions of LLVM that
didn't support the instruction, or versions with the instruction
disabled, will use shifts instead.

A second rule for reduction-of-extend being the same as the original
value was added to keep an existing shift-related test passing as well.

* Add reference assemblies for new opts
2023-04-17 18:48:08 +00:00
..
2023-04-17 15:53:34 +00:00
2023-04-05 17:06:36 +00:00

This crate contains the core Cranelift code generator. It translates code from an intermediate representation into executable machine code.