diff options
| author | bors <bors@rust-lang.org> | 2023-07-20 15:05:39 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2023-07-20 15:05:39 +0000 |
| commit | 06a53ddc0bd3a50f9bcf2f7c373011dc7869f59f (patch) | |
| tree | 854cfd269af4e934514334956f1f5277dcd75f24 /tests/codegen/slice-iter-len-eq-zero.rs | |
| parent | 6b53175b5d8558b69f5f46ce969fe42fb457e01b (diff) | |
| parent | 254bf6027d83a94e93b5112d558c81a3e050413f (diff) | |
| download | rust-06a53ddc0bd3a50f9bcf2f7c373011dc7869f59f.tar.gz rust-06a53ddc0bd3a50f9bcf2f7c373011dc7869f59f.zip | |
Auto merge of #113758 - cjgillot:move-dse, r=JakobDegen,oli-obk
Turn copy into moves during DSE. Dead store elimination computes whether removing a direct store to an unborrowed place is allowed. Where removing a store is allowed, writing `uninit` is too. This means that we can use this pass to transform `copy` operands into `move` operands. This is only interesting in call terminators, so we only handle those. Special care is taken for the `use_both(_1, _1)` case: - moving the second argument is ok, as `_1` is not live after the call; - moving the first argument is not, as the second argument reads `_1`. Fixes #75993 Fixes https://github.com/rust-lang/rust/issues/108068 r? `@RalfJung` cc `@JakobDegen`
Diffstat (limited to 'tests/codegen/slice-iter-len-eq-zero.rs')
0 files changed, 0 insertions, 0 deletions
