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

LLVM codegen errors with Invalid insertelement operands in latest nightlies #121180

Closed
AlexTMjugador opened this issue Feb 16, 2024 · 5 comments · Fixed by #121395
Closed

LLVM codegen errors with Invalid insertelement operands in latest nightlies #121180

AlexTMjugador opened this issue Feb 16, 2024 · 5 comments · Fixed by #121395
Assignees
Labels
A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. C-bug Category: This is a bug. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ llvm-fixed-upstream Issue expected to be fixed by the next major LLVM upgrade, or backported fixes T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@AlexTMjugador
Copy link

AlexTMjugador commented Feb 16, 2024

Code

https://github.com/ComunidadAylas/PackSquash/tree/8ddb8451b4c4102188e6807233feac6cb4091872

Meta

rustc --version --verbose:

1.78.0-nightly (a4472498d 2024-02-15)

Error output

Can be seen in more detail in GitHub Actions workflow output logs:

image
image

Notes

This is a pretty low-level LLVM codegen error that does not really fit the bill of an internal rustc compile error, as it happens at a layer below rustc, but I picked this report template because it seems like a pretty "internal" issue with the Rust compiler nevertheless.

I didn't dive into the precise cause of this error at all, but judging from the error messages, it seems related to rustc generating bad LLVM IR for the rustfft crate.

On my CI setup, the issue only happens for Linux and macOS x64 targets. Windows x64 and Linux and macOS AArch64 targets build fine.

@AlexTMjugador AlexTMjugador added C-bug Category: This is a bug. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Feb 16, 2024
@rustbot rustbot added the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Feb 16, 2024
@nikic nikic added the A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. label Feb 16, 2024
@nikic
Copy link
Contributor

nikic commented Feb 16, 2024

How should one reproduce this? cargo +nightly build --release works fine for me (on x64 Linux).

@nikic
Copy link
Contributor

nikic commented Feb 16, 2024

Ah, I get the error with cargo +nightly test --release.

@nikic
Copy link
Contributor

nikic commented Feb 16, 2024

Repro: opt -passes=slp-vectorizer on https://gist.github.com/nikic/94ef389d1ba1ac6ce9c327a54426e92b.

Does not reproduce with LLVM trunk.

@nikic nikic self-assigned this Feb 16, 2024
@nikic
Copy link
Contributor

nikic commented Feb 16, 2024

Looks like this has been fixed by llvm/llvm-project@48bbd76.

@AlexTMjugador
Copy link
Author

Thanks for looking into the issue! The reproduction step is indeed to run cargo +nightly test --release on the linked code. A cargo build works fine for me too.

@saethlin saethlin removed the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Feb 16, 2024
@nikic nikic added the llvm-fixed-upstream Issue expected to be fixed by the next major LLVM upgrade, or backported fixes label Feb 19, 2024
bors added a commit to rust-lang-ci/rust that referenced this issue Feb 21, 2024
bors added a commit to rust-lang-ci/rust that referenced this issue Feb 22, 2024
bors added a commit to rust-lang-ci/rust that referenced this issue Feb 22, 2024
bors added a commit to rust-lang-ci/rust that referenced this issue Feb 22, 2024
bors added a commit to rust-lang-ci/rust that referenced this issue Feb 24, 2024
bors added a commit to rust-lang-ci/rust that referenced this issue Mar 1, 2024
@bors bors closed this as completed in e612d07 Mar 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. C-bug Category: This is a bug. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ llvm-fixed-upstream Issue expected to be fixed by the next major LLVM upgrade, or backported fixes T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants