rust/compiler/rustc_mir_transform/src
bors 89e0576bd3 Auto merge of #106340 - saethlin:propagate-operands, r=oli-obk
Always permit ConstProp to exploit arithmetic identities

Fixes https://github.com/rust-lang/rust/issues/72751

Initially, I thought I would need to enable operand propagation then do something else, but actually https://github.com/rust-lang/rust/pull/74491 already has the fix for the issue in question! It looks like this optimization was put under MIR opt level 3 due to possible soundness/stability implications, then demoted further to MIR opt level 4 when MIR opt level 2 became associated with `--release`.

Perhaps in the past we were doing CTFE on optimized MIR? We aren't anymore, so this optimization has no stability implications.

r? `@oli-obk`
2023-01-09 11:59:51 +00:00
..
coverage Add missing anonymous lifetime 2022-12-20 22:28:22 +01:00
inline
abort_unwinding_calls.rs
add_call_guards.rs
add_moves_for_packed_drops.rs Prefer doc comments over //-comments in compiler 2022-11-27 11:19:04 +00:00
add_retag.rs make retagging work even with 'unstable' places 2022-12-06 10:33:34 +01:00
check_const_item_mutation.rs
check_packed_ref.rs
check_unsafety.rs rustc: Remove needless lifetimes 2022-12-20 22:10:40 +01:00
cleanup_post_borrowck.rs Remove false edges in CleanupPostBorrowck 2022-12-17 19:34:45 +01:00
const_debuginfo.rs
const_goto.rs Remove unneeded field from SwitchTargets 2022-12-09 04:53:10 -08:00
const_prop_lint.rs
const_prop.rs Always take advantage of arithmetic identities 2023-01-01 23:12:29 -05:00
dataflow_const_prop.rs Move alignment failure error reporting to machine 2022-12-15 16:07:35 +00:00
dead_store_elimination.rs Move SimplifyLocals before ConstProp. 2022-12-25 18:01:07 +00:00
deaggregator.rs
deduce_param_attrs.rs rustc: Remove needless lifetimes 2022-12-20 22:10:40 +01:00
deduplicate_blocks.rs
deref_separator.rs
dest_prop.rs rustc: Remove needless lifetimes 2022-12-20 22:10:40 +01:00
dump_mir.rs Auto merge of #105220 - oli-obk:feeding, r=cjgillot 2022-12-06 03:47:41 +00:00
early_otherwise_branch.rs Remove unneeded field from SwitchTargets 2022-12-09 04:53:10 -08:00
elaborate_box_derefs.rs Prefer doc comments over //-comments in compiler 2022-11-27 11:19:04 +00:00
elaborate_drops.rs
ffi_unwind_calls.rs
function_item_references.rs Introduce PredicateKind::Clause 2022-11-25 00:04:54 -03:00
generator.rs Don't require owned data in MaybeStorageLive 2022-12-13 04:22:47 -08:00
inline.rs Reenable limited top-down MIR inlining 2023-01-01 22:01:29 -08:00
instcombine.rs
lib.rs Auto merge of #105323 - cjgillot:simplify-const-prop, r=davidtwco 2023-01-07 16:13:18 +00:00
lower_intrinsics.rs
lower_slice_len.rs
match_branches.rs Remove unneeded field from SwitchTargets 2022-12-09 04:53:10 -08:00
multiple_return_terminators.rs
normalize_array_len.rs Disable NormalizeArrayLen 2022-12-19 17:38:18 -08:00
nrvo.rs
pass_manager.rs Use zero based indexing for pass_count 2022-12-02 15:55:24 +00:00
remove_noop_landing_pads.rs
remove_storage_markers.rs
remove_uninit_drops.rs
remove_unneeded_drops.rs
remove_zsts.rs Combine projection and opaque into alias 2022-12-13 17:48:55 +00:00
required_consts.rs
reveal_all.rs
separate_const_switch.rs
shim.rs Retag argument to drop_in_place unconditionally 2022-12-21 14:59:55 -08:00
simplify_branches.rs Remove unneeded field from SwitchTargets 2022-12-09 04:53:10 -08:00
simplify_comparison_integral.rs Remove unneeded field from SwitchTargets 2022-12-09 04:53:10 -08:00
simplify_try.rs rustc: Remove needless lifetimes 2022-12-20 22:10:40 +01:00
simplify.rs Remove Nop in simplify_locals. 2022-12-25 18:01:07 +00:00
sroa.rs clippy::complexity fixes 2022-12-19 00:04:28 +01:00
uninhabited_enum_branching.rs move things from rustc_target::abi to rustc_abi 2022-11-24 16:26:13 +03:30
unreachable_prop.rs Remove unneeded field from SwitchTargets 2022-12-09 04:53:10 -08:00