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 Move /src/test to /tests 2023-01-11 09:32:08 +00:00
cast.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
checked.main.DataflowConstProp.diff Remove overflow checks from ConstProp. 2023-02-18 21:35:02 +00:00
checked.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
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 Move /src/test to /tests 2023-01-11 09:32:08 +00:00
if.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
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 Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue_81605.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
ref_without_sb.main.DataflowConstProp.diff Move /src/test to /tests 2023-01-11 09:32:08 +00:00
ref_without_sb.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
repr_transparent.main.DataflowConstProp.diff Bless tests. 2023-02-02 23:26:26 +00:00
repr_transparent.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
self_assign_add.main.DataflowConstProp.diff Move /src/test to /tests 2023-01-11 09:32:08 +00:00
self_assign_add.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
self_assign.main.DataflowConstProp.diff Move /src/test to /tests 2023-01-11 09:32:08 +00:00
self_assign.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
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 Move /src/test to /tests 2023-01-11 09:32:08 +00:00
terminator.main.DataflowConstProp.diff Move /src/test to /tests 2023-01-11 09:32:08 +00:00
terminator.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
tuple.main.DataflowConstProp.diff Bless tests. 2023-02-02 23:26:26 +00:00
tuple.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00