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

Don't know how to soften fpowi to fpow on x86 uefi targets #134508

Open
usamoi opened this issue Dec 19, 2024 · 2 comments
Open

Don't know how to soften fpowi to fpow on x86 uefi targets #134508

usamoi opened this issue Dec 19, 2024 · 2 comments
Labels
A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. C-external-bug Category: issue that is caused by bugs in software beyond our control O-UEFI UEFI T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@usamoi
Copy link
Contributor

usamoi commented Dec 19, 2024

I tried this code:

#[no_mangle]
fn f(x: f32, n: i32) -> f32 {
    x.powi(n)
}
cargo build --target x86_64-unknown-uefi

I expected to see this happen: it compiles

Instead, this happened:

error: Don't know how to soften fpowi to fpow

Same error on i686-unknown-uefi, but not on aarch64-unknown-uefi.

Meta

rustc --version --verbose:

rustc 1.83.0 (90b35a623 2024-11-26)
binary: rustc
commit-hash: 90b35a6239c3d8bdabc530a6a0816f7ff89a0aaf
commit-date: 2024-11-26
host: x86_64-unknown-linux-gnu
release: 1.83.0
LLVM version: 19.1.1
@usamoi usamoi added the C-bug Category: This is a bug. label Dec 19, 2024
@rustbot rustbot added the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Dec 19, 2024
@bjorn3
Copy link
Member

bjorn3 commented Dec 19, 2024

@bjorn3 bjorn3 added the A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. label Dec 19, 2024
@jieyouxu jieyouxu added T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. O-UEFI UEFI C-external-bug Category: issue that is caused by bugs in software beyond our control and removed C-bug Category: This is a bug. needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. labels Dec 20, 2024
@usamoi
Copy link
Contributor Author

usamoi commented Dec 21, 2024

It compiles with a custom target with llvm-target set to x86_64-unknown-uefi, so #132570 should help fix this.

This method does not work for i686-unknown-uefi. I see error: rustc interrupted by SIGSEGV, printing backtrace using a custom target.

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-external-bug Category: issue that is caused by bugs in software beyond our control O-UEFI UEFI T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

4 participants