Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve handling of assertion failures with very long conditions #116548

Merged
merged 2 commits into from
Oct 10, 2023

Conversation

nnethercote
Copy link
Contributor

It's not perfectly clear what the best behaviour is here, but I think this is an improvement.

r? @matthewjasper
cc @m-ou-se

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Oct 9, 2023
@matthewjasper
Copy link
Contributor

@bors r+

@bors
Copy link
Contributor

bors commented Oct 9, 2023

📌 Commit a6abc50 has been approved by matthewjasper

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Oct 9, 2023
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Oct 9, 2023
… r=matthewjasper

Improve handling of assertion failures with very long conditions

It's not perfectly clear what the best behaviour is here, but I think this is an improvement.

r? `@matthewjasper`
cc `@m-ou-se`
bors added a commit to rust-lang-ci/rust that referenced this pull request Oct 9, 2023
…iaskrgr

Rollup of 5 pull requests

Successful merges:

 - rust-lang#115882 (improve the suggestion of `generic_bound_failure`)
 - rust-lang#116537 (Fix suggestion span involving wrongly placed generic arg on variant)
 - rust-lang#116543 (In smir `find_crates` returns `Vec<Crate>` instead of `Option<Crate>`)
 - rust-lang#116548 (Improve handling of assertion failures with very long conditions)
 - rust-lang#116556 (Sync rustc_codegen_cranelift)

r? `@ghost`
`@rustbot` modify labels: rollup
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Oct 9, 2023
… r=matthewjasper

Improve handling of assertion failures with very long conditions

It's not perfectly clear what the best behaviour is here, but I think this is an improvement.

r? ``@matthewjasper``
cc ``@m-ou-se``
@oli-obk
Copy link
Contributor

oli-obk commented Oct 9, 2023

@bors r- #116563 (comment)

@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Oct 9, 2023
@nnethercote
Copy link
Contributor Author

nnethercote commented Oct 9, 2023

The test failure was here:

2023-10-09T13:16:26.0432231Z failures:
2023-10-09T13:16:26.0434317Z 
2023-10-09T13:16:26.0434846Z ---- [ui] tests/ui/macros/assert-long-condition.rs stdout ----
2023-10-09T13:16:26.0437558Z diff of run.stderr:
2023-10-09T13:16:26.0437800Z 
2023-10-09T13:16:26.0438136Z 1	thread 'main' panicked at $DIR/assert-long-condition.rs:7:5:
2023-10-09T13:16:26.0438534Z 2	assertion failed: 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + 15 + 16 + 17 + 18
2023-10-09T13:16:26.0438879Z 3	                                + 19 + 20 + 21 + 22 + 23 + 24 + 25 == 0
2023-10-09T13:16:26.0439302Z -	note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
2023-10-09T13:16:26.0439607Z +	stack backtrace:
2023-10-09T13:16:26.0439833Z +	   0: rust_begin_unwind
2023-10-09T13:16:26.0440415Z +	             at /rustc/95049a4a9b4e0ee378a478958fde603ad441ee0d/library/std/src/panicking.rs:597:5
2023-10-09T13:16:26.0441138Z +	   1: core::panicking::panic_fmt
2023-10-09T13:16:26.0441484Z +	             at /rustc/95049a4a9b4e0ee378a478958fde603ad441ee0d/library/core/src/panicking.rs:72:14
2023-10-09T13:16:26.0441802Z +	   2: core::panicking::panic
2023-10-09T13:16:26.0442130Z +	             at /rustc/95049a4a9b4e0ee378a478958fde603ad441ee0d/library/core/src/panicking.rs:127:5
2023-10-09T13:16:26.0442442Z +	   3: assert_long_condition::main
2023-10-09T13:16:26.0443119Z +	   4: core::ops::function::FnOnce::call_once
2023-10-09T13:16:26.0443495Z +	note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

The problem is that in some cases RUST_BACKTRACE=1 is set, which changes the uninteresting parts of the output, which means the .run.stderr file doesn't match.

Other assert tests in tests/ui/macros/ instead use the error-pattern header to check the output of assertions. I didn't use that because it chops off whitespace from the start and end of the patterns, which means I couldn't precisely check for the expected + 19 + 20 + 21 + 22 + 23 + 24 + 25 == 0 output line.

In other words, a .run.stderr file over-specifies the expected output, while an error-pattern header under-specifies the expected output. I need something in between, that matches the assertion failed lines exactly, but ignores the backtrace lines.

@Mark-Simulacrum
Copy link
Member

IIRC, you can set a header like exec-env: RUST_BACKTRACE=0 or so? That'll disable the backtrace independent of runner environment.

The `\n` in the output is a little surprising. The next commit will deal
with it.
The assertion in `assert-long-condition.rs` used to be fail like this, all on
one line:
```
thread 'main' panicked at 'assertion failed: 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + 15 + 16 + 17 + 18\n                                + 19 + 20 + 21 + 22 + 23 + 24 + 25 == 0', tests/ui/macros/assert-long-condition.rs:7:5
```
The `\n` and subsequent indent is because the condition is pretty-printed, and
the pretty-printer inserts a newline. Printing the newline in this way is
arguably reasonable given that the message appears within single quotes, which
is very similar to a string literal.

However, after the assertion printing improvements that were released in 1.73,
the assertion now fails like this:
```
thread 'main' panicked at tests/ui/macros/assert-long-condition.rs:7:5:
assertion failed: 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + 15 + 16 + 17 + 18\n                                + 19 + 20 + 21 + 22 + 23 + 24 + 25 == 0
```
Now that there are no single quotes around the pretty-printed condition, the
`\n` is quite strange.

This commit gets rid of the `\n`, by removing the `escape_debug` done on the
pretty-printed message. This results in the following:
```
thread 'main' panicked at tests/ui/macros/assert-long-condition.rs:7:5:
assertion failed: 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + 15 + 16 + 17 + 18
                                + 19 + 20 + 21 + 22 + 23 + 24 + 25 == 0
```
The overly-large indent is still strange, but that's a separate pretty-printing issue.

This change helps with rust-lang#108341.
@nnethercote nnethercote force-pushed the assert-long-condition branch from a6abc50 to 7528fdc Compare October 9, 2023 22:10
@nnethercote
Copy link
Contributor Author

IIRC, you can set a header like exec-env: RUST_BACKTRACE=0 or so? That'll disable the backtrace independent of runner environment.

Great suggestion, thank you. I have updated with this change.

@bors r=matthewjasper

@bors
Copy link
Contributor

bors commented Oct 9, 2023

📌 Commit 7528fdc has been approved by matthewjasper

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Oct 9, 2023
@bors
Copy link
Contributor

bors commented Oct 9, 2023

⌛ Testing commit 7528fdc with merge 2fc0d48...

bors added a commit to rust-lang-ci/rust that referenced this pull request Oct 9, 2023
…=matthewjasper

Improve handling of assertion failures with very long conditions

It's not perfectly clear what the best behaviour is here, but I think this is an improvement.

r? `@matthewjasper`
cc `@m-ou-se`
@nnethercote
Copy link
Contributor Author

Here's another example:

fn very_long_function_name(x: u32) -> u32 { x }

fn main() {
    assert!(
        {
            let x = 1;
            let y = 2;
            very_long_function_name(x) + very_long_function_name(y) 
        } == 
        {
            let x = 0;
            let y = 1;
            very_long_function_name(x) + very_long_function_name(y)
        }
    );
}

Previously it would produce a single line of output on failure:

assertion failed: {\n        let x = 1;\n        let y = 2;\n        very_long_function_name(x) + very_long_function_name(y)\n    } ==\n    {\n        let x = 0;\n        let y = 1;\n        very_long_function_name(x) + very_long_function_name(y)\n    }

Now it produces something much better:

thread 'main' panicked at s3.rs:4:5:
assertion failed: {
        let x = 1;
        let y = 2;
        very_long_function_name(x) + very_long_function_name(y)
    } ==
    {
        let x = 0;
        let y = 1;
        very_long_function_name(x) + very_long_function_name(y)
    }

@rust-log-analyzer
Copy link
Collaborator

The job x86_64-apple-2 failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
SCCACHE_BUCKET=rust-lang-ci-sccache2
SCRIPT=./x.py --stage 2 test tests/ui tests/rustdoc tests/run-make-fulldeps
SHELL=/bin/bash
SHLVL=3
SSH_AUTH_SOCK=/private/tmp/com.apple.launchd.ByB7tssGkA/Listeners
STATS_EXTP=https://provjobdsettingscdn.blob.core.windows.net/settings/provjobdsettings-0.5.154/provjobd.data
STATS_RDCL=true
STATS_TIS=mining
STATS_TRP=true
---
---- [ui] tests/ui/panics/default-backtrace-ice.rs stdout ----
diff of stderr:

7 
8 aborting due to `-Z treat-err-as-bug=1`
- (end_short_backtrace)
11 (begin_short_backtrace)
12 (end_short_backtrace)
13 (begin_short_backtrace)
---
To only update this specific test, also pass `--test-args panics/default-backtrace-ice.rs`

error: 1 errors occurred comparing output.
status: exit status: 101
command: env -u RUST_BACKTRACE RUSTC_ICE="0" "/Users/runner/work/rust/rust/build/x86_64-apple-darwin/stage2/bin/rustc" "/Users/runner/work/rust/rust/tests/ui/panics/default-backtrace-ice.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/Users/runner/.cargo" "--sysroot" "/Users/runner/work/rust/rust/build/x86_64-apple-darwin/stage2" "--target=x86_64-apple-darwin" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/Users/runner/work/rust/rust/build/x86_64-apple-darwin/test/ui/panics/default-backtrace-ice" "-A" "unused" "-A" "internal_features" "-Crpath" "-Cdebuginfo=0" "-Lnative=/Users/runner/work/rust/rust/build/x86_64-apple-darwin/native/rust-test-helpers" "-L" "/Users/runner/work/rust/rust/build/x86_64-apple-darwin/test/ui/panics/default-backtrace-ice/auxiliary" "-Z" "treat-err-as-bug=1"
--- stderr -------------------------------
error[E0425]: cannot find value `missing_ident` in this scope
##[error]  --> /Users/runner/work/rust/rust/tests/ui/panics/default-backtrace-ice.rs:21:13
   |
   |
LL | fn main() { missing_ident; }

thread 'rustc' panicked at compiler/rustc_errors/src/lib.rs:1729:30:
thread 'rustc' panicked at compiler/rustc_errors/src/lib.rs:1729:30:
aborting due to `-Z treat-err-as-bug=1`
   0:        0x10fb2081b - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h8a95a5cbccd78887
   1:        0x10fb80ee3 - core::fmt::write::hb04d061035ed20ad
   2:        0x10fb15b3e - std::io::Write::write_fmt::hf38694845b01a9f1
   3:        0x10fb205f9 - std::sys_common::backtrace::print::h7a8d070d3d4ee1cf
   3:        0x10fb205f9 - std::sys_common::backtrace::print::h7a8d070d3d4ee1cf
   4:        0x10fb239f5 - std::panicking::default_hook::{{closure}}::hb4ab6daf06a58b92
   5:        0x10fb2375c - std::panicking::default_hook::h4d5b7a6342554f08
   6:        0x1184c916c - std[7f944414dabb1aa9]::panicking::update_hook::<alloc[2020624d4b317041]::boxed::Box<rustc_driver_impl[2147db866b029c2]::install_ice_hook::{closure#0}>>::{closure#0}
   8:        0x10fb23e37 - std::panicking::begin_panic_handler::{{closure}}::h48c961c263d140d6
   9:        0x10fb20d29 - ___udivmodti4
  10:        0x10fb23bad - _rust_begin_unwind
  11:        0x10fbac225 - core::panicking::panic_fmt::h4cf299f45ce0d3b5
  11:        0x10fbac225 - core::panicking::panic_fmt::h4cf299f45ce0d3b5
  12:        0x11cfc308f - <rustc_errors[9d06b0f5ddf88f00]::HandlerInner>::panic_if_treat_err_as_bug
  13:        0x11cfc23d7 - <rustc_errors[9d06b0f5ddf88f00]::HandlerInner>::emit_diagnostic::{closure#2}
  14:        0x11863345f - rustc_interface[12b8f4fb458e1a65]::callbacks::track_diagnostic
  15:        0x11cfc1d3e - <rustc_errors[9d06b0f5ddf88f00]::HandlerInner>::emit_diagnostic
  16:        0x11cfd2a51 - <rustc_span[132c6ce6dc48cbe2]::ErrorGuaranteed as rustc_errors[9d06b0f5ddf88f00]::diagnostic_builder::EmissionGuarantee>::diagnostic_builder_emit_producing_guarantee
  17:        0x11b952acd - <rustc_resolve[f8ac38102d3e156e]::Resolver>::report_errors
  18:        0x11b9d0a43 - <rustc_session[b0937f9425687dfb]::session::Session>::time::<(), <rustc_resolve[f8ac38102d3e156e]::Resolver>::resolve_crate::{closure#0}>
  19:        0x11b9860ae - <rustc_resolve[f8ac38102d3e156e]::Resolver>::resolve_crate
  20:        0x118639f25 - rustc_interface[12b8f4fb458e1a65]::passes::resolver_for_lowering
  21:        0x11bfd668d - rustc_query_impl[d5e825b51704c2f7]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[d5e825b51704c2f7]::query_impl::resolver_for_lowering::dynamic_query::{closure#2}::{closure#0}, rustc_middle[4d7fe7c2d38276b0]::query::erase::Erased<[u8; 8usize]>>
  22:        0x11c0a2639 - <rustc_query_impl[d5e825b51704c2f7]::query_impl::resolver_for_lowering::dynamic_query::{closure#2} as core[a0f6323dda998a62]::ops::function::FnOnce<(rustc_middle[4d7fe7c2d38276b0]::ty::context::TyCtxt, ())>>::call_once
  23:        0x11bf28c5b - rustc_query_system[df99d34b70760eb7]::query::plumbing::try_execute_query::<rustc_query_impl[d5e825b51704c2f7]::DynamicConfig<rustc_query_system[df99d34b70760eb7]::query::caches::SingleCache<rustc_middle[4d7fe7c2d38276b0]::query::erase::Erased<[u8; 8usize]>>, false, false, false>, rustc_query_impl[d5e825b51704c2f7]::plumbing::QueryCtxt, false>
  24:        0x11c0119fa - rustc_query_impl[d5e825b51704c2f7]::query_impl::resolver_for_lowering::get_query_non_incr::__rust_end_short_backtrace
  25:        0x118485896 - <rustc_middle[4d7fe7c2d38276b0]::ty::context::GlobalCtxt>::enter::<rustc_driver_impl[2147db866b029c2]::run_compiler::{closure#1}::{closure#2}::{closure#4}, &rustc_data_structures[d9c00a0ffddd01f5]::steal::Steal<(rustc_middle[4d7fe7c2d38276b0]::ty::ResolverAstLowering, alloc[2020624d4b317041]::rc::Rc<rustc_ast[71070f7c5b6984ff]::ast::Crate>)>>
  26:        0x1184aa736 - rustc_span[132c6ce6dc48cbe2]::set_source_map::<core[a0f6323dda998a62]::result::Result<(), rustc_span[132c6ce6dc48cbe2]::ErrorGuaranteed>, rustc_interface[12b8f4fb458e1a65]::interface::run_compiler<core[a0f6323dda998a62]::result::Result<(), rustc_span[132c6ce6dc48cbe2]::ErrorGuaranteed>, rustc_driver_impl[2147db866b029c2]::run_compiler::{closure#1}>::{closure#0}::{closure#0}>
  27:        0x11848faec - std[7f944414dabb1aa9]::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface[12b8f4fb458e1a65]::util::run_in_thread_with_globals<rustc_interface[12b8f4fb458e1a65]::interface::run_compiler<core[a0f6323dda998a62]::result::Result<(), rustc_span[132c6ce6dc48cbe2]::ErrorGuaranteed>, rustc_driver_impl[2147db866b029c2]::run_compiler::{closure#1}>::{closure#0}, core[a0f6323dda998a62]::result::Result<(), rustc_span[132c6ce6dc48cbe2]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[a0f6323dda998a62]::result::Result<(), rustc_span[132c6ce6dc48cbe2]::ErrorGuaranteed>>
  28:        0x11849129e - <<std[7f944414dabb1aa9]::thread::Builder>::spawn_unchecked_<rustc_interface[12b8f4fb458e1a65]::util::run_in_thread_with_globals<rustc_interface[12b8f4fb458e1a65]::interface::run_compiler<core[a0f6323dda998a62]::result::Result<(), rustc_span[132c6ce6dc48cbe2]::ErrorGuaranteed>, rustc_driver_impl[2147db866b029c2]::run_compiler::{closure#1}>::{closure#0}, core[a0f6323dda998a62]::result::Result<(), rustc_span[132c6ce6dc48cbe2]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[a0f6323dda998a62]::result::Result<(), rustc_span[132c6ce6dc48cbe2]::ErrorGuaranteed>>::{closure#1} as core[a0f6323dda998a62]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  30:     0x7ff80c1be1d3 - __pthread_start

error: the compiler unexpectedly panicked. this is a bug.


note: we would appreciate a bug report: https://github.com/rust-lang/rust/issues/new?labels=C-bug%2C+I-ICE%2C+T-compiler&template=ice.md

note: rustc 1.75.0-nightly (2fc0d4870 2023-10-09) running on x86_64-apple-darwin

note: compiler flags: -Z threads=1 -Z simulate-remapped-rust-src-base=/rustc/FAKE_PREFIX -Z translate-remapped-path-to-local-path=no -Z ignore-directory-in-diagnostics-source-blocks=/Users/runner/.cargo -C codegen-units=1 -Z ui-testing -Z deduplicate-diagnostics=no -Z write-long-types-to-disk=no -C strip=debuginfo -C prefer-dynamic -C rpath -C debuginfo=0 -Z treat-err-as-bug=1
query stack during panic:
#0 [resolver_for_lowering] getting the resolver for lowering
end of query stack
------------------------------------------

@bors
Copy link
Contributor

bors commented Oct 9, 2023

💔 Test failed - checks-actions

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Oct 9, 2023
@nnethercote
Copy link
Contributor Author

@bors retry

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Oct 10, 2023
@nnethercote
Copy link
Contributor Author

@bors rollup

@bors
Copy link
Contributor

bors commented Oct 10, 2023

⌛ Testing commit 7528fdc with merge 1501c72...

bors added a commit to rust-lang-ci/rust that referenced this pull request Oct 10, 2023
…=matthewjasper

Improve handling of assertion failures with very long conditions

It's not perfectly clear what the best behaviour is here, but I think this is an improvement.

r? `@matthewjasper`
cc `@m-ou-se`
@rust-log-analyzer
Copy link
Collaborator

The job x86_64-gnu-stable failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
failures:

---- [codegen] tests/codegen/target-feature-inline-closure.rs stdout ----

error: verification with 'FileCheck' failed
status: exit status: 1
command: "/checkout/obj/build/x86_64-unknown-linux-gnu/ci-llvm/bin/FileCheck" "--input-file" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/codegen/target-feature-inline-closure/target-feature-inline-closure.ll" "/checkout/tests/codegen/target-feature-inline-closure.rs" "--allow-unused-prefixes" "--check-prefixes" "CHECK,NONMSVC" "--dump-input-context" "100"
--- stderr -------------------------------
/checkout/tests/codegen/target-feature-inline-closure.rs:27:16: error: CHECK-NOT: excluded string found in input
/checkout/tests/codegen/target-feature-inline-closure.rs:27:16: error: CHECK-NOT: excluded string found in input
 // CHECK-NOT: fadd
               ^
/checkout/obj/build/x86_64-unknown-linux-gnu/test/codegen/target-feature-inline-closure/target-feature-inline-closure.ll:35:66: note: found here
 call fastcc void @_ZN4core9core_arch3x863avx13_mm256_add_ps17h50faddcd25a37f1cE(ptr noalias nocapture noundef nonnull align 32 dereferenceable(32) %_0, ptr noalias nocapture noundef nonnull align 32 dereferenceable(32) %1, ptr noalias nocapture noundef nonnull align 32 dereferenceable(32) %0)

Input file: /checkout/obj/build/x86_64-unknown-linux-gnu/test/codegen/target-feature-inline-closure/target-feature-inline-closure.ll
Check file: /checkout/tests/codegen/target-feature-inline-closure.rs


-dump-input=help explains the following input dump.
Input was:
<<<<<<
<<<<<<
        1: ; ModuleID = 'target_feature_inline_closure.5b935a73a363356c-cgu.0' 
        2: source_filename = "target_feature_inline_closure.5b935a73a363356c-cgu.0" 
        3: target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" 
        4: target triple = "x86_64-unknown-linux-gnu" 
        5:  
        6: ; core::core_arch::x86::avx::_mm256_add_ps 
        7: ; Function Attrs: inlinehint mustprogress nofree norecurse nosync nounwind nonlazybind willreturn memory(argmem: readwrite) uwtable 
        8: define internal fastcc void @_ZN4core9core_arch3x863avx13_mm256_add_ps17h50faddcd25a37f1cE(ptr noalias nocapture noundef writeonly align 32 dereferenceable(32) %_0, ptr noalias nocapture noundef readonly align 32 dereferenceable(32) %a, ptr noalias nocapture noundef readonly align 32 dereferenceable(32) %b) unnamed_addr #0 { 
        9: start: 
       10:  %0 = load <8 x float>, ptr %a, align 32 
       11:  %1 = load <8 x float>, ptr %b, align 32 
       12:  %2 = fadd <8 x float> %0, %1 
       13:  store <8 x float> %2, ptr %_0, align 32 
       14:  ret void 
       15: } 
       16:  
       17: ; Function Attrs: mustprogress nofree norecurse nosync nounwind nonlazybind willreturn memory(argmem: readwrite) uwtable 
       18: define void @with_avx(ptr noalias nocapture noundef writeonly sret(<8 x float>) align 32 dereferenceable(32) %_0, ptr noalias nocapture noundef readonly align 32 dereferenceable(32) %x) unnamed_addr #1 { 
       19: start: 
       20:  %0 = load <8 x float>, ptr %x, align 32 
       21:  %1 = fadd <8 x float> %0, %0 
       22:  store <8 x float> %1, ptr %_0, align 32 
       23:  ret void 
       24: } 
       25:  
       26: ; Function Attrs: mustprogress nofree norecurse nosync nounwind nonlazybind willreturn memory(argmem: readwrite) uwtable 
       27: define void @without_avx(ptr noalias nocapture noundef writeonly sret(<8 x float>) align 32 dereferenceable(32) %_0, ptr noalias nocapture noundef readonly align 32 dereferenceable(32) %x) unnamed_addr #2 { 
       28: start: 
       29:  %0 = alloca <8 x float>, align 32 
       30:  %1 = alloca <8 x float>, align 32 
       31:  %2 = load <8 x float>, ptr %x, align 32 
       32:  store <8 x float> %2, ptr %1, align 32 
       33:  store <8 x float> %2, ptr %0, align 32 
       34: ; call core::core_arch::x86::avx::_mm256_add_ps 
       35:  call fastcc void @_ZN4core9core_arch3x863avx13_mm256_add_ps17h50faddcd25a37f1cE(ptr noalias nocapture noundef nonnull align 32 dereferenceable(32) %_0, ptr noalias nocapture noundef nonnull align 32 dereferenceable(32) %1, ptr noalias nocapture noundef nonnull align 32 dereferenceable(32) %0) 
not:27                                                                      !~~~                                                                                                                                                                                                                                   error: no match expected
       36:  ret void 
       37: } 
       38:  
       39: attributes #0 = { inlinehint mustprogress nofree norecurse nosync nounwind nonlazybind willreturn memory(argmem: readwrite) uwtable "probe-stack"="inline-asm" "target-cpu"="x86-64" "target-features"="+avx" } 
       40: attributes #1 = { mustprogress nofree norecurse nosync nounwind nonlazybind willreturn memory(argmem: readwrite) uwtable "probe-stack"="inline-asm" "target-cpu"="x86-64" "target-features"="+avx" } 
       41: attributes #2 = { mustprogress nofree norecurse nosync nounwind nonlazybind willreturn memory(argmem: readwrite) uwtable "probe-stack"="inline-asm" "target-cpu"="x86-64" } 
       42:  
       43: !llvm.module.flags = !{!0, !1} 
       44: !llvm.ident = !{!2} 
       45:  
       46: !0 = !{i32 8, !"PIC Level", i32 2} 
       47: !1 = !{i32 2, !"RtLibUseGOT", i32 1} 
       48: !2 = !{!"rustc version 1.75.0 (1501c7220 2023-10-10)"} 
------------------------------------------



@bors
Copy link
Contributor

bors commented Oct 10, 2023

💔 Test failed - checks-actions

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Oct 10, 2023
@nnethercote
Copy link
Contributor Author

@bors retry

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Oct 10, 2023
@bors
Copy link
Contributor

bors commented Oct 10, 2023

⌛ Testing commit 7528fdc with merge 091bb74...

@bors
Copy link
Contributor

bors commented Oct 10, 2023

☀️ Test successful - checks-actions
Approved by: matthewjasper
Pushing 091bb74 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Oct 10, 2023
@bors bors merged commit 091bb74 into rust-lang:master Oct 10, 2023
11 checks passed
@rustbot rustbot added this to the 1.75.0 milestone Oct 10, 2023
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (091bb74): comparison URL.

Overall result: no relevant changes - no action needed

@rustbot label: -perf-regression

Instruction count

This benchmark run did not return any relevant results for this metric.

Max RSS (memory usage)

Results

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
2.6% [2.6%, 2.6%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) - - 0

Cycles

This benchmark run did not return any relevant results for this metric.

Binary size

This benchmark run did not return any relevant results for this metric.

Bootstrap: 625.981s -> 627.172s (0.19%)
Artifact size: 270.83 MiB -> 270.83 MiB (-0.00%)

bors-ferrocene bot added a commit to ferrocene/ferrocene that referenced this pull request Oct 12, 2023
48: Pull upstream master 2023 10 12 r=tshepang a=Dajamante

* rust-lang/rust#113487
* rust-lang/rust#116506
* rust-lang/rust#116448
* rust-lang/rust#116640
  * rust-lang/rust#116627
  * rust-lang/rust#116597
  * rust-lang/rust#116436
  * rust-lang/rust#116315
  * rust-lang/rust#116219
* rust-lang/rust#113218
* rust-lang/rust#115937
* rust-lang/rust#116014
* rust-lang/rust#116623
* rust-lang/rust#112818
* rust-lang/rust#115948
* rust-lang/rust#116622
* rust-lang/rust#116621
  * rust-lang/rust#116612
  * rust-lang/rust#116611
  * rust-lang/rust#116530
  * rust-lang/rust#95967
* rust-lang/rust#116578
* rust-lang/rust#113915
* rust-lang/rust#116605
  * rust-lang/rust#116574
  * rust-lang/rust#116560
  * rust-lang/rust#116559
  * rust-lang/rust#116503
  * rust-lang/rust#116444
  * rust-lang/rust#116250
  * rust-lang/rust#109422
* rust-lang/rust#116598
  * rust-lang/rust#116596
  * rust-lang/rust#116595
  * rust-lang/rust#116589
  * rust-lang/rust#116586
* rust-lang/rust#116551
* rust-lang/rust#116409
* rust-lang/rust#116548
* rust-lang/rust#116366
* rust-lang/rust#109882
* rust-lang/rust#116497
* rust-lang/rust#116532
* rust-lang/rust#116569
  * rust-lang/rust#116561
  * rust-lang/rust#116556
  * rust-lang/rust#116549
  * rust-lang/rust#116543
  * rust-lang/rust#116537
  * rust-lang/rust#115882
* rust-lang/rust#116142
* rust-lang/rust#115238
* rust-lang/rust#116533
* rust-lang/rust#116096
* rust-lang/rust#116468
* rust-lang/rust#116515
* rust-lang/rust#116454
* rust-lang/rust#116183
* rust-lang/rust#116514
* rust-lang/rust#116509
* rust-lang/rust#116487
* rust-lang/rust#116486
* rust-lang/rust#116450
* rust-lang/rust#114623
* rust-lang/rust#116416
* rust-lang/rust#116437
* rust-lang/rust#100806
* rust-lang/rust#116330
* rust-lang/rust#116310
* rust-lang/rust#115583
* rust-lang/rust#116457
* rust-lang/rust#116508
* rust-lang/rust#109214
* rust-lang/rust#116318
* rust-lang/rust#116501
  * rust-lang/rust#116500
  * rust-lang/rust#116458
  * rust-lang/rust#116400
  * rust-lang/rust#116277
* rust-lang/rust#114709
* rust-lang/rust#116492
  * rust-lang/rust#116484
  * rust-lang/rust#116481
  * rust-lang/rust#116474
  * rust-lang/rust#116466
  * rust-lang/rust#116423
  * rust-lang/rust#116297
  * rust-lang/rust#114564
* rust-lang/rust#114811
* rust-lang/rust#116489
* rust-lang/rust#115304

Co-authored-by: Peter Hall <[email protected]>
Co-authored-by: Emanuele Vannacci <[email protected]>
Co-authored-by: Neven Villani <[email protected]>
Co-authored-by: Alex Macleod <[email protected]>
Co-authored-by: Tamir Duberstein <[email protected]>
Co-authored-by: Eduardo Sánchez Muñoz <[email protected]>
Co-authored-by: koka <[email protected]>
Co-authored-by: bors <[email protected]>
Co-authored-by: Philipp Krones <[email protected]>
Co-authored-by: Camille GILLOT <[email protected]>
Co-authored-by: Esteban Küber <[email protected]>
Co-authored-by: Ralf Jung <[email protected]>
bors-ferrocene bot added a commit to ferrocene/ferrocene that referenced this pull request Oct 13, 2023
48: Pull upstream master 2023 10 12 r=tshepang a=Dajamante

* rust-lang/rust#113487
* rust-lang/rust#116506
* rust-lang/rust#116448
* rust-lang/rust#116640
  * rust-lang/rust#116627
  * rust-lang/rust#116597
  * rust-lang/rust#116436
  * rust-lang/rust#116315
  * rust-lang/rust#116219
* rust-lang/rust#113218
* rust-lang/rust#115937
* rust-lang/rust#116014
* rust-lang/rust#116623
* rust-lang/rust#112818
* rust-lang/rust#115948
* rust-lang/rust#116622
* rust-lang/rust#116621
  * rust-lang/rust#116612
  * rust-lang/rust#116611
  * rust-lang/rust#116530
  * rust-lang/rust#95967
* rust-lang/rust#116578
* rust-lang/rust#113915
* rust-lang/rust#116605
  * rust-lang/rust#116574
  * rust-lang/rust#116560
  * rust-lang/rust#116559
  * rust-lang/rust#116503
  * rust-lang/rust#116444
  * rust-lang/rust#116250
  * rust-lang/rust#109422
* rust-lang/rust#116598
  * rust-lang/rust#116596
  * rust-lang/rust#116595
  * rust-lang/rust#116589
  * rust-lang/rust#116586
* rust-lang/rust#116551
* rust-lang/rust#116409
* rust-lang/rust#116548
* rust-lang/rust#116366
* rust-lang/rust#109882
* rust-lang/rust#116497
* rust-lang/rust#116532
* rust-lang/rust#116569
  * rust-lang/rust#116561
  * rust-lang/rust#116556
  * rust-lang/rust#116549
  * rust-lang/rust#116543
  * rust-lang/rust#116537
  * rust-lang/rust#115882
* rust-lang/rust#116142
* rust-lang/rust#115238
* rust-lang/rust#116533
* rust-lang/rust#116096
* rust-lang/rust#116468
* rust-lang/rust#116515
* rust-lang/rust#116454
* rust-lang/rust#116183
* rust-lang/rust#116514
* rust-lang/rust#116509
* rust-lang/rust#116487
* rust-lang/rust#116486
* rust-lang/rust#116450
* rust-lang/rust#114623
* rust-lang/rust#116416
* rust-lang/rust#116437
* rust-lang/rust#100806
* rust-lang/rust#116330
* rust-lang/rust#116310
* rust-lang/rust#115583
* rust-lang/rust#116457
* rust-lang/rust#116508
* rust-lang/rust#109214
* rust-lang/rust#116318
* rust-lang/rust#116501
  * rust-lang/rust#116500
  * rust-lang/rust#116458
  * rust-lang/rust#116400
  * rust-lang/rust#116277
* rust-lang/rust#114709
* rust-lang/rust#116492
  * rust-lang/rust#116484
  * rust-lang/rust#116481
  * rust-lang/rust#116474
  * rust-lang/rust#116466
  * rust-lang/rust#116423
  * rust-lang/rust#116297
  * rust-lang/rust#114564
* rust-lang/rust#114811
* rust-lang/rust#116489
* rust-lang/rust#115304

Co-authored-by: Emanuele Vannacci <[email protected]>
Co-authored-by: Neven Villani <[email protected]>
Co-authored-by: Alex Macleod <[email protected]>
Co-authored-by: Tamir Duberstein <[email protected]>
Co-authored-by: Eduardo Sánchez Muñoz <[email protected]>
Co-authored-by: koka <[email protected]>
Co-authored-by: bors <[email protected]>
Co-authored-by: Philipp Krones <[email protected]>
Co-authored-by: Camille GILLOT <[email protected]>
Co-authored-by: Esteban Küber <[email protected]>
Co-authored-by: Ralf Jung <[email protected]>
Co-authored-by: ShE3py <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged-by-bors This PR was explicitly merged by bors. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants