We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent df9342a commit 700084aCopy full SHA for 700084a
tests/codegen/enum-match.rs
@@ -34,8 +34,11 @@ pub enum Enum1 {
34
35
// CHECK: define noundef i8 @match1{{.*}}
36
// CHECK-NEXT: start:
37
-// CHECK-NEXT: [[DISCR:%.*]] = {{.*}}call i8 @llvm.usub.sat.i8(i8 %0, i8 1)
38
-// CHECK-NEXT: switch i8 [[DISCR]], label {{.*}} [
+// CHECK-NEXT: %1 = add i8 %0, -2
+// CHECK-NEXT: %2 = zext i8 %1 to i64
39
+// CHECK-NEXT: %3 = icmp ult i8 %1, 2
40
+// CHECK-NEXT: %4 = add nuw nsw i64 %2, 1
41
+// CHECK-NEXT: %_2 = select i1 %3, i64 %4, i64 0
42
#[no_mangle]
43
pub fn match1(e: Enum1) -> u8 {
44
use Enum1::*;
0 commit comments