From d1b2d29528b7794b41e66fc2136e395a02f8529b Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Thu, 30 May 2024 05:59:35 +0200 Subject: Merging upstream version 1.73.0+dfsg1. Signed-off-by: Daniel Baumann --- tests/mir-opt/dead-store-elimination/call_arg_copy.rs | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 tests/mir-opt/dead-store-elimination/call_arg_copy.rs (limited to 'tests/mir-opt/dead-store-elimination/call_arg_copy.rs') diff --git a/tests/mir-opt/dead-store-elimination/call_arg_copy.rs b/tests/mir-opt/dead-store-elimination/call_arg_copy.rs new file mode 100644 index 000000000..41f91fc13 --- /dev/null +++ b/tests/mir-opt/dead-store-elimination/call_arg_copy.rs @@ -0,0 +1,15 @@ +// EMIT_MIR_FOR_EACH_PANIC_STRATEGY +// unit-test: DeadStoreElimination +// compile-flags: -Zmir-enable-passes=+CopyProp + +#[inline(never)] +fn use_both(_: i32, _: i32) {} + +// EMIT_MIR call_arg_copy.move_simple.DeadStoreElimination.diff +fn move_simple(x: i32) { + use_both(x, x); +} + +fn main() { + move_simple(1); +} -- cgit v1.2.3