Skip to content

Commit 0d350c1

Browse files
authored
Unrolled build for #141654
Rollup merge of #141654 - durin42:randomly-fixed-test, r=jieyouxu tests: mark option-niche-eq as fixed on LLVM 21 Some combination of recent Rust changes (between 3d86494 and aa57e46 from what I can tell) and changes in LLVM 21 (not recently, as best I can tell) have caused this test to start showing the behavior we want, so it's time to move this test to a proper place and mark it as fixed on LLVM 21. ~~Probably "fixes" #49892, but I'll let others make that call.~~ Closes #49892 unless we want to break out a dedicated issue for `Option<bool>::eq` on LLVM 20 (seems low-value). `@rustbot` label llvm-main
2 parents c583fa6 + a963e6f commit 0d350c1

File tree

2 files changed

+11
-15
lines changed

2 files changed

+11
-15
lines changed

tests/codegen/option-niche-eq.rs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
1+
//@ revisions: REGULAR LLVM21
12
//@ min-llvm-version: 20
23
//@ compile-flags: -Copt-level=3 -Zmerge-functions=disabled
4+
//@ [LLVM21] min-llvm-version: 21
35
#![crate_type = "lib"]
46

57
extern crate core;
@@ -74,3 +76,12 @@ pub fn niche_eq(l: Option<EnumWithNiche>, r: Option<EnumWithNiche>) -> bool {
7476
// CHECK-NEXT: ret i1
7577
l == r
7678
}
79+
80+
// LLVM21-LABEL: @bool_eq
81+
#[no_mangle]
82+
pub fn bool_eq(l: Option<bool>, r: Option<bool>) -> bool {
83+
// LLVM21: start:
84+
// LLVM21-NEXT: icmp eq i8
85+
// LLVM21-NEXT: ret i1
86+
l == r
87+
}

tests/codegen/option-niche-unfixed/option-bool-eq.rs

Lines changed: 0 additions & 15 deletions
This file was deleted.

0 commit comments

Comments
 (0)