-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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
Spurious errors emitted for global-scope asm with ThinLTO #61991
Comments
@llvm/issue-subscribers-backend-risc-v |
Upstream issue: llvm/llvm-project#61991 ok jsg@ (maintainer)
I'm trying to fix this issue and rust-lang/rust#80608 rust-lang/rust#127269 which I believe have the same root cause. So far I've narrowed it down to here https://github.com/llvm/llvm-project/blob/main/llvm/lib/Object/ModuleSymbolTable.cpp#L96 it creates an ASM parser with empty ( Any hints would be appreciated. |
Also noting from the other thread: this appears not JUST to be a RISC-V relevant issue, it's applicable to any target that requires target features. The issue linked in rust-lang/rust#127269 is for an Arm Cortex-R processor. |
Provide both the default target CPU and default target features from the module's context, rather than empty strings. Fixes llvm#61991.
https://bugs.webkit.org/show_bug.cgi?id=282900 Reviewed by NOBODY (OOPS!). This is a llvm bug, passing `-march=riscv64gc -cpu=lp64d` from clang will lost after it got llvm side. So we have to set arch here. More related infomations are here: - rust-lang/rust#80608 - llvm/llvm-project#61991 - llvm/llvm-project#97685 * Source/JavaScriptCore/assembler/MacroAssemblerRISCV64.cpp: * Source/JavaScriptCore/llint/LowLevelInterpreter.cpp:
https://bugs.webkit.org/show_bug.cgi?id=282900 Reviewed by NOBODY (OOPS!). This is a llvm bug, passing `-march=riscv64gc -cpu=lp64d` from clang will lost after it got llvm side. So we have to set arch here. More related infomations are here: - rust-lang/rust#80608 - llvm/llvm-project#61991 - llvm/llvm-project#97685 * Source/JavaScriptCore/assembler/MacroAssemblerRISCV64.cpp: * Source/JavaScriptCore/llint/LowLevelInterpreter.cpp:
https://bugs.webkit.org/show_bug.cgi?id=282900 Reviewed by NOBODY (OOPS!). This is a llvm bug, passing `-march=riscv64gc -cpu=lp64d` from clang will lost after it got llvm side. So we have to set arch here. More related infomations are here: - rust-lang/rust#80608 - llvm/llvm-project#61991 - llvm/llvm-project#97685 * Source/JavaScriptCore/assembler/MacroAssemblerRISCV64.cpp: * Source/JavaScriptCore/llint/LowLevelInterpreter.cpp:
https://bugs.webkit.org/show_bug.cgi?id=282900 Reviewed by NOBODY (OOPS!). This is a llvm bug, passing `-march=riscv64gc -cpu=lp64d` from clang will lost after it got llvm side. So we have to set arch here. More related infomations are here: - rust-lang/rust#80608 - llvm/llvm-project#61991 - llvm/llvm-project#97685 * Source/JavaScriptCore/assembler/MacroAssemblerRISCV64.cpp: * Source/JavaScriptCore/llint/LowLevelInterpreter.cpp:
https://bugs.webkit.org/show_bug.cgi?id=282900 Reviewed by Yusuke Suzuki. This is a llvm bug, passing `-march=riscv64gc -cpu=lp64d` from clang will lost after it got llvm side. So we have to set arch here. More related infomations are here: - rust-lang/rust#80608 - llvm/llvm-project#61991 - llvm/llvm-project#97685 * Source/JavaScriptCore/assembler/MacroAssemblerRISCV64.cpp: * Source/JavaScriptCore/llint/LowLevelInterpreter.cpp: Canonical link: https://commits.webkit.org/286815@main
…gi?id=282900 [RISCV] Fix instruction requires the following: 'D'/'F'/'M' https://bugs.webkit.org/show_bug.cgi?id=282900 Reviewed by Yusuke Suzuki. This is a llvm bug, passing `-march=riscv64gc -cpu=lp64d` from clang will lost after it got llvm side. So we have to set arch here. More related infomations are here: - rust-lang/rust#80608 - llvm/llvm-project#61991 - llvm/llvm-project#97685 * Source/JavaScriptCore/assembler/MacroAssemblerRISCV64.cpp: * Source/JavaScriptCore/llint/LowLevelInterpreter.cpp: Canonical link: https://commits.webkit.org/286815@main Canonical link: https://commits.webkit.org/282416.360@webkitglib/2.46
https://bugs.webkit.org/show_bug.cgi?id=282900 Reviewed by Yusuke Suzuki. This is a llvm bug, passing `-march=riscv64gc -cpu=lp64d` from clang will lost after it got llvm side. So we have to set arch here. More related infomations are here: - rust-lang/rust#80608 - llvm/llvm-project#61991 - llvm/llvm-project#97685 * Source/JavaScriptCore/assembler/MacroAssemblerRISCV64.cpp: * Source/JavaScriptCore/llint/LowLevelInterpreter.cpp: Canonical link: https://commits.webkit.org/286815@main
test.c
asm("fld f0, 0(sp)");
Output
The D feature is enabled by default on
riscv64-unknown-linux-gnu
, so this error should normally not be emitted.However compilation still completes successfully (exit code 0) and produces valid LLVM bitcode in
test.o
.Similar bug in rustc: rust-lang/rust#80608
The text was updated successfully, but these errors were encountered: