-
-
Notifications
You must be signed in to change notification settings - Fork 14.9k
f16::is_normal broken on s390x #154101
Copy link
Copy link
Closed
Labels
A-LLVMArea: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.C-bugCategory: This is a bug.Category: This is a bug.F-f16_and_f128`#![feature(f16)]`, `#![feature(f128)]``#![feature(f16)]`, `#![feature(f128)]`I-miscompileIssue: Correct Rust code lowers to incorrect machine codeIssue: Correct Rust code lowers to incorrect machine codellvm-fixed-upstreamIssue expected to be fixed by the next major LLVM upgrade, or backported fixesIssue expected to be fixed by the next major LLVM upgrade, or backported fixes
Metadata
Metadata
Assignees
Labels
A-LLVMArea: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.C-bugCategory: This is a bug.Category: This is a bug.F-f16_and_f128`#![feature(f16)]`, `#![feature(f128)]``#![feature(f16)]`, `#![feature(f128)]`I-miscompileIssue: Correct Rust code lowers to incorrect machine codeIssue: Correct Rust code lowers to incorrect machine codellvm-fixed-upstreamIssue expected to be fixed by the next major LLVM upgrade, or backported fixesIssue expected to be fixed by the next major LLVM upgrade, or backported fixes
Type
Fields
Give feedbackNo fields configured for issues without a type.
I tried this code on
s390x:./x test tests/ui/float/classify-runtime-const.rsthe failing case condensed is:
I expected to see this happen:
the program should return a
0because the calculation result isnot_normalInstead, this happened:
with
-O(or-C opt-level=3) I see a1instead of a0Analysis
this is due to a bug in the llvm backend1. llvm will issue
f16expand instructions that will loose information.Steps
f16is feature gated. I guess for now its ok to emit wrong code forf16::is_normal+-C opt-level=3?We are working on fixing the bug in the llvm backend. with the next backend update it should be fixed.
Footnotes
https://github.com/llvm/llvm-project/issues/187518 ↩