Rollup merge of #152128 - zmodem:matches-logical-or-141497, r=nikic

Adopt matches-logical-or-141497.rs to LLVM HEAD

After http://github.com/llvm/llvm-project/pull/178977, the and + icmp are folded to trunc.
This commit is contained in:
Jonathan Brouwer 2026-02-05 08:32:57 +01:00 committed by GitHub
commit f163864627
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -2,7 +2,7 @@
// `f == FrameType::Inter || f == FrameType::Switch`.
//@ compile-flags: -Copt-level=3
//@ min-llvm-version: 21
//@ min-llvm-version: 23
#![crate_type = "lib"]
@ -18,8 +18,7 @@ pub enum FrameType {
#[no_mangle]
pub fn is_inter_or_switch(f: FrameType) -> bool {
// CHECK-NEXT: start:
// CHECK-NEXT: and i8
// CHECK-NEXT: icmp
// CHECK-NEXT: trunc i8 %{{.*}} to i1
// CHECK-NEXT: ret
matches!(f, FrameType::Inter | FrameType::Switch)
}