rust/compiler/rustc_mir_transform
bors 905b926967 Auto merge of #151622 - scottmcm:elide-more-transmutes, r=cjgillot
GVN: Elide more intermediate transmutes

We already skipped intermediate steps like `u32` or `i32` that support any (initialized) value.

This extends that to also allow skipping intermediate steps whose values are a superset of either the source or destination type.  Most importantly, that means that `usize` → `NonZeroUsize` → `ptr::Alignment` and `ptr::Alignment` → `NonZeroUsize` → `usize` can skip the middle because `NonZeroUsize` is a superset of `Alignment`.

Then `Alignment::as_usize` is updated to take advantage of that and let us remove some more locals in a few places.

r? cjgillot
2026-01-31 20:42:37 +00:00
..
src Auto merge of #151622 - scottmcm:elide-more-transmutes, r=cjgillot 2026-01-31 20:42:37 +00:00
Cargo.toml compiler: upgrade to hashbrown 0.16.1 2026-01-13 11:18:09 -08:00
messages.ftl Handle inline asm in has_ffi_unwind_calls 2025-11-25 16:01:02 +00:00