diff options
| author | Nicholas Nethercote <n.nethercote@gmail.com> | 2025-02-18 11:24:57 +1100 |
|---|---|---|
| committer | Nicholas Nethercote <n.nethercote@gmail.com> | 2025-02-18 12:52:56 +1100 |
| commit | a1daa34ad005d0b34d30c878cb4e2e995346d300 (patch) | |
| tree | bde73eb01e0197b4c9064ed7c9a0a01ba00a0c5e /tests/mir-opt/enum_opt.unin.EnumSizeOpt.32bit.diff | |
| parent | ce36a966c79e109dabeef7a47fe68e5294c6d71e (diff) | |
| download | rust-a1daa34ad005d0b34d30c878cb4e2e995346d300.tar.gz rust-a1daa34ad005d0b34d30c878cb4e2e995346d300.zip | |
Use `MirPatch` in `EnumSizeOpt`.
Instead of `expand_statements`. This makes the code shorter and consistent with other MIR transform passes. The tests require updating because there is a slight change in MIR output: - the old code replaced the original statement with twelve new statements. - the new code inserts converts the original statement to a `nop` and then insert twelve new statements in front of it. I.e. we now end up with an extra `nop`, which doesn't matter at all.
Diffstat (limited to 'tests/mir-opt/enum_opt.unin.EnumSizeOpt.32bit.diff')
| -rw-r--r-- | tests/mir-opt/enum_opt.unin.EnumSizeOpt.32bit.diff | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/mir-opt/enum_opt.unin.EnumSizeOpt.32bit.diff b/tests/mir-opt/enum_opt.unin.EnumSizeOpt.32bit.diff index 6d1e2a72fdb..96c5aadd85f 100644 --- a/tests/mir-opt/enum_opt.unin.EnumSizeOpt.32bit.diff +++ b/tests/mir-opt/enum_opt.unin.EnumSizeOpt.32bit.diff @@ -47,6 +47,7 @@ + Deinit(_8); + copy_nonoverlapping(dst = copy _9, src = copy _11, count = copy _7); + StorageDead(_4); ++ nop; StorageDead(_2); - _0 = move _1; + StorageLive(_12); @@ -61,6 +62,7 @@ + Deinit(_16); + copy_nonoverlapping(dst = copy _17, src = copy _19, count = copy _15); + StorageDead(_12); ++ nop; StorageDead(_1); return; } |
