-
Notifications
You must be signed in to change notification settings - Fork 13.7k
Closed as duplicate of#122734
Labels
I-heavyIssue: Problems and improvements with respect to binary size of generated code.Issue: Problems and improvements with respect to binary size of generated code.S-blockedStatus: Blocked on something else such as an RFC or other implementation work.Status: Blocked on something else such as an RFC or other implementation work.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.llvm-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
Description
Option<bool>::eq
is ~20 lines of assembly as of rustc 1.87.0-nightly (a2e63569f 2025-03-26)
.
Repro: https://rust.godbolt.org/z/hPn8TvvYP
This is here to track this FIXME:
rust/tests/codegen/option-niche-eq.rs
Lines 65 to 73 in 2a06022
// FIXME: This should work too | |
// // FIXME-CHECK-LABEL: @bool_eq | |
// #[no_mangle] | |
// pub fn bool_eq(l: Option<bool>, r: Option<bool>) -> bool { | |
// // FIXME-CHECK: start: | |
// // FIXME-CHECK-NEXT: icmp eq i8 | |
// // FIXME-CHECK-NEXT: ret i1 | |
// l == r | |
// } |
With llvm/llvm-project#133344 fixed upstream (thanks @veera-sivarajan for jumping on it so quickly!) after the LLVM 21 version upgrade we should revisit this and see whether we can enable that test.
veera-sivarajan
Metadata
Metadata
Assignees
Labels
I-heavyIssue: Problems and improvements with respect to binary size of generated code.Issue: Problems and improvements with respect to binary size of generated code.S-blockedStatus: Blocked on something else such as an RFC or other implementation work.Status: Blocked on something else such as an RFC or other implementation work.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.llvm-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