about summary refs log tree commit diff
diff options
context:
space:
mode:
authorCamille GILLOT <gillot.camille@gmail.com>2023-04-11 18:34:44 +0000
committerCamille GILLOT <gillot.camille@gmail.com>2023-04-14 16:26:11 +0000
commit700084aa97e346acedc925dbd89b54cbb266b084 (patch)
tree52ccafa84d754fae913bb6e1d58732c20b5b966c
parentdf9342aa6f426bd786cf390110321338a6624e40 (diff)
downloadrust-700084aa97e346acedc925dbd89b54cbb266b084.tar.gz
rust-700084aa97e346acedc925dbd89b54cbb266b084.zip
Update codegen test.
-rw-r--r--tests/codegen/enum-match.rs7
1 files changed, 5 insertions, 2 deletions
diff --git a/tests/codegen/enum-match.rs b/tests/codegen/enum-match.rs
index 5f8063a27f7..36c6be19012 100644
--- a/tests/codegen/enum-match.rs
+++ b/tests/codegen/enum-match.rs
@@ -34,8 +34,11 @@ pub enum Enum1 {
 
 // CHECK: define noundef i8 @match1{{.*}}
 // CHECK-NEXT: start:
-// CHECK-NEXT: [[DISCR:%.*]] = {{.*}}call i8 @llvm.usub.sat.i8(i8 %0, i8 1)
-// CHECK-NEXT: switch i8 [[DISCR]], label {{.*}} [
+// CHECK-NEXT: %1 = add i8 %0, -2
+// CHECK-NEXT: %2 = zext i8 %1 to i64
+// CHECK-NEXT: %3 = icmp ult i8 %1, 2
+// CHECK-NEXT: %4 = add nuw nsw i64 %2, 1
+// CHECK-NEXT: %_2 = select i1 %3, i64 %4, i64 0
 #[no_mangle]
 pub fn match1(e: Enum1) -> u8 {
     use Enum1::*;