about summary refs log tree commit diff
path: root/tests/mir-opt
AgeCommit message (Collapse)AuthorLines
2023-12-19Auto merge of #119112 - Nadrieril:remove-target_blocks-hack, r=matthewjasperbors-21/+21
match lowering: Remove the `make_target_blocks` hack This hack was introduced 4 years ago in [`a1d0266` (#60730)](https://github.com/rust-lang/rust/pull/60730/commits/a1d0266878793bc8b2bf50958eb529005ed19da0) to improve LLVM optimization time, specifically noticed in the `encoding` benchmark. Measurements today indicate it is no longer needed. r? `@matthewjasper`
2023-12-19Remove the `make_target_blocks` hackNadrieril-21/+21
It was introduced 4 years ago in a1d0266878793bc8 to improve LLVM optimization time. Measurements today indicate it is no longer needed.
2023-12-17Avoid overflow in GVN constant indexing.Camille GILLOT-0/+226
2023-12-11End locals' live range before suspending coroutineTomasz Miąsko-0/+12
State transforms retains storage statements for locals that are not stored inside a coroutine. It ensures those locals are live when resuming by inserting StorageLive as appropriate. It forgot to end the storage of those locals when suspending, which is fixed here. While the end of live range is implicit when executing return, it is nevertheless useful for inliner which would otherwise extend the live range beyond return.
2023-12-10Auto merge of #118550 - cjgillot:filecheck-const-prop, r=Mark-Simulacrumbors-253/+290
Add FileCheck annotations to const_prop tests Unblocks https://github.com/rust-lang/rust/pull/116012 Advances https://github.com/rust-lang/rust/issues/116971
2023-12-07also print 'immutable' flagRalf Jung-49/+49
2023-12-02FileCheck while_let_loops.Camille GILLOT-1/+2
2023-12-02FileCheck tuple_literal_propagation.Camille GILLOT-2/+3
2023-12-02FileCheck return_place.Camille GILLOT-1/+2
2023-12-02FileCheck switch_int.Camille GILLOT-1/+8
2023-12-02FileCheck slice_len.Camille GILLOT-7/+22
2023-12-02FileCheck scalar_literal_propagation.Camille GILLOT-1/+3
2023-12-02FileCheck repeat.Camille GILLOT-1/+3
2023-12-02FileCheck reify_fn_ptr.Camille GILLOT-1/+4
2023-12-02FileCheck ref_deref.Camille GILLOT-8/+19
2023-12-02FileCheck read_immutable_static.Camille GILLOT-1/+3
2023-12-02FileCheck mutable_variable_unprop_assign.Camille GILLOT-2/+12
2023-12-02FileCheck mutable_variable_aggregate_partial_read.Camille GILLOT-1/+7
2023-12-02FileCheck mutable_variable_no_prop.Camille GILLOT-1/+8
2023-12-02FileCheck mutable_variable_aggregate_mut_ref.Camille GILLOT-1/+8
2023-12-02FileCheck mutable_variable_aggregate.Camille GILLOT-1/+6
2023-12-02FileCheck mutable_variable.Camille GILLOT-1/+6
2023-12-02FileCheck mult_by_zero.Camille GILLOT-3/+4
2023-12-02FileCheck issue_67019.Camille GILLOT-2/+8
2023-12-02FileCheck issue_66971.Camille GILLOT-6/+20
2023-12-02FileCheck inherit_overflow.Camille GILLOT-3/+6
2023-12-02FileCheck indirect.Camille GILLOT-1/+3
2023-12-02FileCheck discriminant.Camille GILLOT-2/+13
2023-12-02FileCheck and rename const_prop_fails_gracefully.Camille GILLOT-12/+18
2023-12-02FileCheck checked_add.Camille GILLOT-1/+4
2023-12-02FileCheck cast.Camille GILLOT-2/+5
2023-12-02FileCheck boxes.Camille GILLOT-1/+5
2023-12-02FileCheck boolean_identities.Camille GILLOT-8/+36
2023-12-02FileCheck bad_op_unsafe_oob_for_slices.Camille GILLOT-1/+4
2023-12-02FileCheck bad_op_mod_by_zero.Camille GILLOT-1/+8
2023-12-02FileCheck bad_op_div_by_zero.Camille GILLOT-2/+8
2023-12-02FileCheck array_index.Camille GILLOT-2/+4
2023-12-02FileCheck aggregate.Camille GILLOT-174/+14
2023-12-02FileCheck address_of_pair.Camille GILLOT-1/+14
2023-12-02Auto merge of #118077 - calebzulawski:sync-portable-simd-2023-11-19, ↵bors-114/+114
r=workingjubilee Portable SIMD subtree update Syncs nightly to the latest changes from rust-lang/portable-simd r? `@rust-lang/libs`
2023-11-29Rollup merge of #118426 - aDotInTheVoid:const-wat, r=compiler-errors,cjgillotMatthias Krüger-0/+46
ConstProp: Correctly remove const if unknown value assigned to it. Closes #118328 The problematic sequence of MIR is: ```rust _1 = const 0_usize; _1 = const _; // This is an associated constant we can't know before monomorphization. _0 = _1; ``` 1. When `ConstProp::visit_assign` happens on `_1 = const 0_usize;`, it records that `0x0usize` is the value for `_1`. 2. Next `visit_assign` happens on `_1 = const _;`. Because the rvalue `.has_param()`, it can't be const evaled. 3. Finaly, `visit_assign` happens on `_0 = _1;`. Here it would think the value of `_1` was `0x0usize` from step 1. The solution is to remove consts when checking the RValue fails, as they may have contained values that should now be invalidated, as that local was overwritten. This should probably be back-ported to beta. Stable is more iffy, as it's gone unidentified since 1.70, so I only think it's worthwhile if there's another reason for a 1.74.1 release anyway.
2023-11-29Auto merge of #114841 - bvanjoi:fix-114814, r=cuviperbors-4/+4
add track_caller for arith ops Fixes #114814 `#[track_caller]` is works, r? `@scottmcm`
2023-11-28Rename and add another testAlona Enraght-Moony-2/+8
2023-11-28ConstProp: Remove const when rvalue check fails.Alona Enraght-Moony-2/+1
2023-11-28Precommit test for https://github.com/rust-lang/rust/issues/118328.Alona Enraght-Moony-0/+41
2023-11-26Update std::simd usage and test outputsCaleb Zulawski-114/+114
2023-11-26Bless MIR testsGary Guo-128/+120
2023-11-24add track_caller for arith opsbohan-4/+4
2023-11-20Fix insertion of statements to be executed along return edge in inliningTomasz Miąsko-591/+193
Inlining creates additional statements to be executed along the return edge: an assignment to the destination, storage end for temporaries. Previously those statements where inserted directly into a call target, but this is incorrect when the target has other predecessors. Avoid the issue by creating a new dedicated block for those statements. When the block happens to be redundant it will be removed by CFG simplification that follows inlining. Fixes #117355
2023-11-16Remove option_payload_ptr; redundant to offset_ofGeorge Bateman-108/+0