That optimization is only for 12-bit immediates in Aarch64, which is now handled in backend lowering, so we can simplify this code a bit now.
This crate contains the core Cranelift code generator. It translates code from an intermediate representation into executable machine code.