about summary refs log tree commit diff
path: root/tests/mir-opt/const_prop
AgeCommit message (Collapse)AuthorLines
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-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-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-24add track_caller for arith opsbohan-2/+2
2023-11-05Auto merge of #117537 - GKFX:offset-of-enum-feature, r=cjgillotbors-1/+1
Feature gate enums in offset_of As requested at https://github.com/rust-lang/rust/issues/106655#issuecomment-1790815262, put enums in offset_of behind their own feature gate. `@rustbot` label F-offset_of
2023-11-05Auto merge of #117469 - cjgillot:filecheck-mir, r=Mark-Simulacrumbors-0/+117
Add FileCheck annotations to a few MIR opt tests const_debuginfo did not specify which passes were running. const_prop_miscompile is renamed and moved to const_prop directory. while_storage was broken.
2023-11-03Feature gate enums in offset_ofGeorge Bateman-1/+1
2023-10-31Update MIR tests for offset_ofGeorge Bateman-28/+28
2023-10-31Support enum variants in offset_of!George Bateman-16/+213
2023-10-31FileCheck const_prop_miscompile.Camille GILLOT-0/+117
2023-10-24Use `PlaceMention` for match scrutinees.Camille GILLOT-0/+6
2023-10-19FileCheck transmute.Camille GILLOT-1/+22
2023-10-19Allow to run filecheck in mir-opt tests.Camille GILLOT-0/+39
2023-10-16Normalize alloc-id in tests.Camille GILLOT-35/+35
2023-10-04Remove mir::LocalDecl::internal.Camille GILLOT-0/+4
2023-09-14fix clippy (and MIR printing) handling of ConstValue::Indirect slicesRalf Jung-5/+5