rust/tests/mir-opt/dataflow-const-prop
Matthias Krüger a423fa7b46
Rollup merge of #108208 - cjgillot:flood-enum, r=oli-obk
Correctly handle aggregates in DataflowConstProp

The previous implementation from https://github.com/rust-lang/rust/pull/107411 flooded target of an aggregate assignment with `Bottom`, corresponding to the `deinit` that the interpreter does.

As a consequence, when assigning `target = Enum::Variant#i(...)` all the `(target as Variant#j)` were at `Bottom` while they should have been `Top`.

This PR replaces that flooding with `Top`.

Aside, it corrects a second bug where the wrong place would be used to assign to enum variant fields, resulting to nothing happening.

Fixes https://github.com/rust-lang/rust/issues/108166
2023-02-23 06:18:06 +01:00
..
cast.main.DataflowConstProp.diff
cast.rs
checked.main.DataflowConstProp.diff Remove overflow checks from ConstProp. 2023-02-18 21:35:02 +00:00
checked.rs
enum.multiple.DataflowConstProp.diff Flood aggregate assignments with Top. 2023-02-18 09:57:13 +00:00
enum.mutate_discriminant.DataflowConstProp.diff Handle discriminants in dataflow-const-prop. 2023-02-06 21:51:47 +00:00
enum.rs Add mir-opt test. 2023-02-18 09:37:31 +00:00
enum.simple.DataflowConstProp.diff Use the correct place for enum variants. 2023-02-18 10:11:53 +00:00
if.main.DataflowConstProp.diff
if.rs
inherit_overflow.main.DataflowConstProp.diff Remove overflow checks from ConstProp. 2023-02-18 21:35:02 +00:00
inherit_overflow.rs Remove overflow checks from ConstProp. 2023-02-18 21:35:02 +00:00
issue_81605.f.DataflowConstProp.diff
issue_81605.rs
ref_without_sb.main.DataflowConstProp.diff
ref_without_sb.rs
repr_transparent.main.DataflowConstProp.diff Bless tests. 2023-02-02 23:26:26 +00:00
repr_transparent.rs
self_assign_add.main.DataflowConstProp.diff
self_assign_add.rs
self_assign.main.DataflowConstProp.diff
self_assign.rs
sibling_ptr.main.DataflowConstProp.diff Clearly document intentional UB in mir-opt tests 2023-02-13 13:50:50 -05:00
sibling_ptr.rs Clearly document intentional UB in mir-opt tests 2023-02-13 13:50:50 -05:00
struct.main.DataflowConstProp.diff Bless tests. 2023-02-02 23:26:26 +00:00
struct.rs
terminator.main.DataflowConstProp.diff
terminator.rs
tuple.main.DataflowConstProp.diff Bless tests. 2023-02-02 23:26:26 +00:00
tuple.rs