diff options
| author | Ralf Jung <post@ralfj.de> | 2025-05-28 06:45:44 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-05-28 06:45:44 +0000 |
| commit | bb976bc43b339c650805478b0ed3b9faaf46b5ea (patch) | |
| tree | 6cef27f0dbb86b2f80a5d4a15549b113f9e30883 /tests/codegen | |
| parent | 98485a89f83b3d5cb03a27eaed3c2c59fc5336cb (diff) | |
| parent | 15f0fb03bbe83245c0fc21775a152e59193fb059 (diff) | |
| download | rust-bb976bc43b339c650805478b0ed3b9faaf46b5ea.tar.gz rust-bb976bc43b339c650805478b0ed3b9faaf46b5ea.zip | |
Merge pull request #4353 from rust-lang/rustup-2025-05-28
Automatic Rustup
Diffstat (limited to 'tests/codegen')
| -rw-r--r-- | tests/codegen/option-niche-eq.rs | 11 | ||||
| -rw-r--r-- | tests/codegen/option-niche-unfixed/option-bool-eq.rs | 15 |
2 files changed, 11 insertions, 15 deletions
diff --git a/tests/codegen/option-niche-eq.rs b/tests/codegen/option-niche-eq.rs index a39e2870a0f..3900cb79aa2 100644 --- a/tests/codegen/option-niche-eq.rs +++ b/tests/codegen/option-niche-eq.rs @@ -1,5 +1,7 @@ +//@ revisions: REGULAR LLVM21 //@ min-llvm-version: 20 //@ compile-flags: -Copt-level=3 -Zmerge-functions=disabled +//@ [LLVM21] min-llvm-version: 21 #![crate_type = "lib"] extern crate core; @@ -74,3 +76,12 @@ pub fn niche_eq(l: Option<EnumWithNiche>, r: Option<EnumWithNiche>) -> bool { // CHECK-NEXT: ret i1 l == r } + +// LLVM21-LABEL: @bool_eq +#[no_mangle] +pub fn bool_eq(l: Option<bool>, r: Option<bool>) -> bool { + // LLVM21: start: + // LLVM21-NEXT: icmp eq i8 + // LLVM21-NEXT: ret i1 + l == r +} diff --git a/tests/codegen/option-niche-unfixed/option-bool-eq.rs b/tests/codegen/option-niche-unfixed/option-bool-eq.rs deleted file mode 100644 index fa0e7836afb..00000000000 --- a/tests/codegen/option-niche-unfixed/option-bool-eq.rs +++ /dev/null @@ -1,15 +0,0 @@ -//@ should-fail -//@ compile-flags: -Copt-level=3 -Zmerge-functions=disabled -//! FIXME(#49892) -//! Tests that LLVM does not fully optimize comparisons of `Option<bool>`. -//! If this starts passing, it can be moved to `tests/codegen/option-niche-eq.rs` -#![crate_type = "lib"] - -// CHECK-LABEL: @bool_eq -#[no_mangle] -pub fn bool_eq(l: Option<bool>, r: Option<bool>) -> bool { - // CHECK: start: - // CHECK-NEXT: icmp eq i8 - // CHECK-NEXT: ret i1 - l == r -} |
