Skip to content

-Zthreads causes cycle errors in previously passing code #122407

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

Open
matthiaskrgr opened this issue Mar 12, 2024 · 3 comments
Open

-Zthreads causes cycle errors in previously passing code #122407

matthiaskrgr opened this issue Mar 12, 2024 · 3 comments
Labels
A-parallel-compiler Area: parallel compiler C-bug Category: This is a bug. I-cycle Issue: A query cycle occurred while none was expected

Comments

@matthiaskrgr
Copy link
Member

cargo new t
cd t
cargo add ppv-lite86
RUSTFLAGS="-Zthreads=16" ~/.cargo/bin/cargo +master build
   Compiling ppv-lite86 v0.2.17
error[E0391]: cycle detected when type-checking `x86_64::sse2::<impl at /home/matthias/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ppv-lite86-0.2.1>
   --> /home/matthias/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ppv-lite86-0.2.17/src/x86_64/sse2.rs:290:9
    |
290 |         fn $name(self) -> Self {
    |         ^^^^^^^^^^^^^^^^^^^^^^
...
313 |     rotr_128!(rotate_each_word_right32, 32);
    |     --------------------------------------- in this macro invocation
    |
note: ...which requires evaluating type-level constant...
   --> /home/matthias/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ppv-lite86-0.2.17/src/x86_64/sse2.rs:294:21
    |
294 |                     _mm_slli_si128(self.x, 128 - $i as i32),
    |                     ^^^^^^^^^^^^^^
...
313 |     rotr_128!(rotate_each_word_right32, 32);
    |     --------------------------------------- in this macro invocation
note: ...which requires const-evaluating + checking `x86_64::sse2::<impl at /home/matthias/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ppv-lite86-0>
   --> /home/matthias/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ppv-lite86-0.2.17/src/x86_64/sse2.rs:294:21
    |
294 |                     _mm_slli_si128(self.x, 128 - $i as i32),
    |                     ^^^^^^^^^^^^^^
...
313 |     rotr_128!(rotate_each_word_right32, 32);
    |     --------------------------------------- in this macro invocation
note: ...which requires caching mir of `x86_64::sse2::<impl at /home/matthias/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ppv-lite86-0.2.17/src/x86>
   --> /home/matthias/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ppv-lite86-0.2.17/src/x86_64/sse2.rs:294:21
    |
294 |                     _mm_slli_si128(self.x, 128 - $i as i32),
    |                     ^^^^^^^^^^^^^^
...
313 |     rotr_128!(rotate_each_word_right32, 32);
    |     --------------------------------------- in this macro invocation
note: ...which requires elaborating drops for `x86_64::sse2::<impl at /home/matthias/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ppv-lite86-0.2.17/>
   --> /home/matthias/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ppv-lite86-0.2.17/src/x86_64/sse2.rs:294:21
    |
294 |                     _mm_slli_si128(self.x, 128 - $i as i32),
    |                     ^^^^^^^^^^^^^^
...
313 |     rotr_128!(rotate_each_word_right32, 32);
...
...
...
...
```
@matthiaskrgr matthiaskrgr added the C-bug Category: This is a bug. label Mar 12, 2024
@rustbot rustbot added the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Mar 12, 2024
@matthiaskrgr matthiaskrgr added A-parallel-compiler Area: parallel compiler I-cycle Issue: A query cycle occurred while none was expected labels Mar 12, 2024
@matthiaskrgr
Copy link
Member Author

this bisects to #122140 cc @oli-obk

@matthiaskrgr
Copy link
Member Author

fun fact: this breaks the the bootstrap of parallel compiler with -Zthreads since ppv-lite86 is one of the dependencies lol

@matthiaskrgr matthiaskrgr changed the title -Zthreads causes cycle -Zthreads causes cycle in code that compiler before Mar 12, 2024
@lqd
Copy link
Member

lqd commented Mar 12, 2024

this bisects to #122140 cc @oli-obk

It’s being reverted in #122347 — still something to fix when/if it relands of course, but at least the parallel WG won’t need to look at this issue until then.

@matthiaskrgr matthiaskrgr changed the title -Zthreads causes cycle in code that compiler before -Zthreads causes cycle errors in previously passing code Mar 12, 2024
@jieyouxu jieyouxu removed the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Mar 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-parallel-compiler Area: parallel compiler C-bug Category: This is a bug. I-cycle Issue: A query cycle occurred while none was expected
Projects
None yet
Development

No branches or pull requests

4 participants