rust/tests
bors d7c59370ce Auto merge of #126844 - scottmcm:more-ptr-cast-gvn, r=saethlin
Remove more `PtrToPtr` casts in GVN

This addresses two things I noticed in MIR:

1. `NonNull::<T>::eq` does `(a as *mut T) == (b as *mut T)`, but it could just compare the `*const T`s, so this removes `PtrToPtr` casts that are on both sides of a pointer comparison, so long as they're not fat-to-thin casts.

2. `NonNull::<T>::addr` does `transmute::<_, usize>(p as *const ())`, but so long as `T: Thin` that cast doesn't do anything, and thus we can directly transmute the `*const T` instead.

r? mir-opt
2024-06-26 14:22:31 +00:00
..
assembly
auxiliary
codegen
codegen-units
coverage
coverage-run-rustdoc
crashes
debuginfo
incremental
mir-opt Auto merge of #126844 - scottmcm:more-ptr-cast-gvn, r=saethlin 2024-06-26 14:22:31 +00:00
pretty
run-make Rollup merge of #126964 - Oneirical:total-catestrophe, r=Kobzol 2024-06-26 07:50:20 +02:00
run-pass-valgrind
rustdoc
rustdoc-gui
rustdoc-js
rustdoc-js-std
rustdoc-json
rustdoc-ui
ui Rollup merge of #126973 - chenyukang:yukang-fix-126756-unsafe-suggestion-error, r=spastorino 2024-06-26 07:50:21 +02:00
ui-fulldeps
COMPILER_TESTS.md