about summary refs log tree commit diff
path: root/compiler/rustc_monomorphize
diff options
context:
space:
mode:
authorScott McMurray <scottmcm@users.noreply.github.com>2024-11-21 17:59:43 -0800
committerScott McMurray <scottmcm@users.noreply.github.com>2025-01-08 18:46:30 -0800
commit8dcc676c9283b040d1ef6d66f156ff2212544b10 (patch)
tree845110d0bc935ff32d70963c479d3f0f60925ff0 /compiler/rustc_monomorphize
parente26ff2f9086fc449b963df578f8641c31846abe6 (diff)
downloadrust-8dcc676c9283b040d1ef6d66f156ff2212544b10.tar.gz
rust-8dcc676c9283b040d1ef6d66f156ff2212544b10.zip
[mir-opt] GVN some more transmute cases
We already did `Transmute`-then-`PtrToPtr`; this adds the nearly-identical `PtrToPtr`-then-`Transmute`.

It also adds `transmute(Foo(x))` → `transmute(x)`, when `Foo` is a single-field transparent type.  That's useful for things like `NonNull { pointer: p }.as_ptr()`.

Found these as I was looking at MCP807-related changes.
Diffstat (limited to 'compiler/rustc_monomorphize')
0 files changed, 0 insertions, 0 deletions