about summary refs log tree commit diff
path: root/tests/mir-opt/instsimplify
AgeCommit message (Collapse)AuthorLines
2023-10-25Never consider raw pointer casts to be trivalNilstrieb-15/+25
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/+75
2023-10-19FileCheck combine_transmutes.Camille GILLOT-0/+211
2023-10-19FileCheck duplicate_switch_targets.Camille GILLOT-0/+50
2023-10-19FileCheck intrinsic_asserts.Camille GILLOT-0/+174
2023-10-19FileCheck combine_clone_of_primitives.Camille GILLOT-0/+162
2023-10-19FileCheck bool_compare.Camille GILLOT-0/+356
2023-10-19FileCheck combine_array_len.Camille GILLOT-0/+169