-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
optimized i686 fails primal-sieve tests #94032
Comments
I just tried |
It passes on i686 release with |
The relevant difference with the NewPM seems to be that the next() method gets inlined now. |
Assigning priority as discussed in the Zulip thread of the Prioritization Working Group. @rustbot label -I-prioritize +P-critical |
Just tested this with the 9f2b322c3782ddda66efcfa36900d27f4507707e toolchain and it still fails, so this issue is not fixed in LLVM 14. |
Also, forcing newPM with 1.58.1 still passes as well! Between stable and beta, the most significant change looks like the patch to disable deferred inlining -- and the test does pass on beta and nightly with (That doesn't mean the inlining decision is wrong -- it's probably just creating circumstances that are buggy in another pass.) |
@cuviper and I just found a slight variant that shows a similar failure on x86_64.... |
We're discussing in this Zulip thread. After discovering the variant where x86_64 fails, we found that it also failed on stable back to 1.55, but passed on 1.54. Bisecting between those took me to #84560, a simple So, I'm removing the regression label, and we can treat it like any ongoing bug. |
FYI I took the test from the primal crate and reduced it down to a single (large!) file: https://gist.github.com/pnkfelix/f45098bc69482dac920dcf384049b849 I suspect this is still too absurdly large to turn into LLVM bitcode to file a bug with LLVM. But, just as i write this, I realize it might suffice as input for the bitcode automatic reduction tools that LLVM distributes. Looking in that next. |
This is flagged as P-critical, but I do not believe it is a 1.59.0 release blocker. (And I think the release team agrees with this.) The investigation, covered in zulip topic, determined this bug is visible as far back as 1.55.0. So: should it be downgraded to P-high? I think the nature of the bug (outright miscompilation) warrants us covering it on a weekly basis in T-compiler meeting, at least for now. So I won't downgrade it yet; we can let the team decide if it should be downgraded during regular triage meeting. |
Upstream issue: llvm/llvm-project#53990 Not a great reduction, but my attempts to construct a minimal MIR test failed. |
The proposed patch does work for me, thanks! |
Priority label has been mentioned during T-compiler weekly meeting on Zulip. This will be reviewed in a follow-up meeting. |
Discovered in huonw/primal#37 (comment)
Code
I don't have reduced code, but the
primal-sieve
testsuite fails oni686-unknown-linux-gnu
when compiled in--release
mode, specifically on this line:https://github.com/huonw/primal/blob/79bafd3400ecf530bea1d26db4f3854407588c2a/primal-sieve/src/sieve.rs#L769
It fails when compiled from x86_64 host:
or with a native i686 host toolchain:
I expected to see this happen: the test should pass
Instead, this happened: FAILED
The left
manual_sum
is wrong, and the rightfolded_sum
is correct. They both come from the same generatedprimes
sieve, so that part of the code appears to have worked correctly. That leaves the difference between thefor
loop and thefold
, and whileSievePrimes
does implement bothnext
andfold
, the differences are small.The same test passes on i686 in debug mode, as well as x86_64 in debug or release.
Version it worked on
It most recently worked on: stable Rust 1.58.1
Version with regression
Both beta and nightly are failing the same way.
@rustbot modify labels: +regression-from-stable-to-beta -regression-untriaged
The text was updated successfully, but these errors were encountered: