Skip to content

Commit 23e5b24

Browse files
committed
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.
1 parent f60a0f1 commit 23e5b24

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

tests/codegen-llvm/issues/matches-logical-or-141497.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// `f == FrameType::Inter || f == FrameType::Switch`.
33

44
//@ compile-flags: -Copt-level=3
5-
//@ min-llvm-version: 21
5+
//@ min-llvm-version: 23
66

77
#![crate_type = "lib"]
88

@@ -18,8 +18,7 @@ pub enum FrameType {
1818
#[no_mangle]
1919
pub fn is_inter_or_switch(f: FrameType) -> bool {
2020
// CHECK-NEXT: start:
21-
// CHECK-NEXT: and i8
22-
// CHECK-NEXT: icmp
21+
// CHECK-NEXT: trunc i8 %{{.*}} to i1
2322
// CHECK-NEXT: ret
2423
matches!(f, FrameType::Inter | FrameType::Switch)
2524
}

0 commit comments

Comments
 (0)