diff options
| author | Nikita Popov <npopov@redhat.com> | 2025-08-08 12:39:30 +0200 |
|---|---|---|
| committer | Nikita Popov <npopov@redhat.com> | 2025-08-11 12:39:23 +0200 |
| commit | ebef9d7f6387fb0541a0dab48d1cd1f86556df04 (patch) | |
| tree | 56bbcaea12e6bc5e848ddecdb3bf95fcf7c4b90c /tests/codegen-llvm/function-arguments.rs | |
| parent | 2886b36df4a646dd8d82fb65bf0c9d8d96c1f71a (diff) | |
| download | rust-ebef9d7f6387fb0541a0dab48d1cd1f86556df04.tar.gz rust-ebef9d7f6387fb0541a0dab48d1cd1f86556df04.zip | |
Set dead_on_return attribute for indirect arguments
Set the dead_on_return attribute (added in LLVM 21) for arguments that are passed indirectly, but not byval. This indicates that the value of the argument on return does not matter, enabling additional dead store elimination.
Diffstat (limited to 'tests/codegen-llvm/function-arguments.rs')
| -rw-r--r-- | tests/codegen-llvm/function-arguments.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/codegen-llvm/function-arguments.rs b/tests/codegen-llvm/function-arguments.rs index c8cd8526ae5..a3fafbe6f82 100644 --- a/tests/codegen-llvm/function-arguments.rs +++ b/tests/codegen-llvm/function-arguments.rs @@ -134,7 +134,7 @@ pub fn mutable_notunpin_borrow(_: &mut NotUnpin) {} #[no_mangle] pub fn notunpin_borrow(_: &NotUnpin) {} -// CHECK: @indirect_struct(ptr noalias{{( nocapture)?}} noundef readonly align 4{{( captures\(none\))?}} dereferenceable(32) %_1) +// CHECK: @indirect_struct(ptr{{( dead_on_return)?}} noalias{{( nocapture)?}} noundef readonly align 4{{( captures\(none\))?}} dereferenceable(32) %_1) #[no_mangle] pub fn indirect_struct(_: S) {} |
