about summary refs log tree commit diff
path: root/tests/mir-opt/instsimplify/casts.rs
AgeCommit message (Collapse)AuthorLines
2024-08-18Update mir-opt filechecksScott McMurray-2/+2
2024-07-29Perform instsimplify before inline to eliminate some trivial callsDianQK-4/+4
2024-06-19Ban `ArrayToPointer` and `MutToConstPointer` from runtime MIRScott McMurray-1/+1
Apparently MIR borrowck cares about at least one of these for checking variance. In runtime MIR, though, there's no need for them as `PtrToPtr` does the same thing. (Banning them simplifies passes like GVN that no longer need to handle multiple cast possibilities.)
2024-04-21InstSimplify `from_raw_parts(p, ())` → `p as _`Scott McMurray-0/+9
2024-04-20mir-opt tests: rename unit-test -> test-mir-passRalf Jung-1/+1
2024-02-22[AUTO_GENERATED] Migrate compiletest to use `ui_test`-style `//@` directives许杰友 Jieyou Xu (Joe)-2/+2
2023-10-25Never consider raw pointer casts to be trivalNilstrieb-3/+3
HIR typeck tries to figure out which casts are trivial by doing them as coercions and seeing whether this works. Since HIR typeck is oblivious of lifetimes, this doesn't work for pointer casts that only change the lifetime of the pointee, which are, as borrowck will tell you, not trivial. This change makes it so that raw pointer casts are never considered trivial. This also incidentally fixes the "trivial cast" lint false positive on the same code. Unfortunately, "trivial cast" lints are now never emitted on raw pointer casts, even if they truly are trivial. This could be fixed by also doing the lint in borrowck for raw pointers specifically.
2023-10-19FileCheck casts.Camille GILLOT-0/+25