From 2967036f57675dbf3e00713d9d9d27956db068e4 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Sun, 25 Jul 2021 21:54:48 +0200 Subject: Update codegen tests for LLVM 13 --- src/test/codegen/array-equality.rs | 4 ++-- src/test/codegen/repeat-trusted-len.rs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'src/test/codegen') diff --git a/src/test/codegen/array-equality.rs b/src/test/codegen/array-equality.rs index 4b60fa4b0bf..fefc232b490 100644 --- a/src/test/codegen/array-equality.rs +++ b/src/test/codegen/array-equality.rs @@ -29,7 +29,7 @@ pub fn array_eq_value_still_passed_by_pointer(a: [u16; 9], b: [u16; 9]) -> bool // CHECK-NEXT: start: // CHECK-NEXT: bitcast // CHECK-NEXT: bitcast - // CHECK-NEXT: %[[CMP:.+]] = tail call i32 @{{bcmp|memcmp}}(i8* nonnull dereferenceable(18) %{{.+}}, i8* nonnull dereferenceable(18) %{{.+}}, i64 18) + // CHECK-NEXT: %[[CMP:.+]] = tail call i32 @{{bcmp|memcmp}}(i8* {{.*}} dereferenceable(18) %{{.+}}, i8* {{.*}} dereferenceable(18) %{{.+}}, i64 18) // CHECK-NEXT: %[[EQ:.+]] = icmp eq i32 %[[CMP]], 0 // CHECK-NEXT: ret i1 %[[EQ]] a == b @@ -41,7 +41,7 @@ pub fn array_eq_long(a: &[u16; 1234], b: &[u16; 1234]) -> bool { // CHECK-NEXT: start: // CHECK-NEXT: bitcast // CHECK-NEXT: bitcast - // CHECK-NEXT: %[[CMP:.+]] = tail call i32 @{{bcmp|memcmp}}(i8* nonnull dereferenceable(2468) %{{.+}}, i8* nonnull dereferenceable(2468) %{{.+}}, i64 2468) + // CHECK-NEXT: %[[CMP:.+]] = tail call i32 @{{bcmp|memcmp}}(i8* {{.*}} dereferenceable(2468) %{{.+}}, i8* {{.*}} dereferenceable(2468) %{{.+}}, i64 2468) // CHECK-NEXT: %[[EQ:.+]] = icmp eq i32 %[[CMP]], 0 // CHECK-NEXT: ret i1 %[[EQ]] a == b diff --git a/src/test/codegen/repeat-trusted-len.rs b/src/test/codegen/repeat-trusted-len.rs index 9e904fc82ab..cb2d0ef809a 100644 --- a/src/test/codegen/repeat-trusted-len.rs +++ b/src/test/codegen/repeat-trusted-len.rs @@ -8,6 +8,6 @@ use std::iter; // CHECK-LABEL: @repeat_take_collect #[no_mangle] pub fn repeat_take_collect() -> Vec { -// CHECK: call void @llvm.memset.p0i8.i{{[0-9]+}}(i8* {{(nonnull )?}}align 1{{.*}} %{{[0-9]+}}, i8 42, i{{[0-9]+}} 100000, i1 false) +// CHECK: call void @llvm.memset.p0i8.i{{[0-9]+}}(i8* {{.*}}align 1{{.*}} %{{[0-9]+}}, i8 42, i{{[0-9]+}} 100000, i1 false) iter::repeat(42).take(100000).collect() } -- cgit 1.4.1-3-g733a5 From 335f003b0241ec544bd337afba91c7d447b05dbe Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Wed, 28 Jul 2021 22:15:51 +0200 Subject: Remove codegen/issue-83623-SIMD-PartialEq.rs This has regressed due to https://bugs.llvm.org/show_bug.cgi?id=51211. It's pretty likely that we'll have to eat this regression for this release. --- src/test/codegen/issue-83623-SIMD-PartialEq.rs | 46 -------------------------- 1 file changed, 46 deletions(-) delete mode 100644 src/test/codegen/issue-83623-SIMD-PartialEq.rs (limited to 'src/test/codegen') diff --git a/src/test/codegen/issue-83623-SIMD-PartialEq.rs b/src/test/codegen/issue-83623-SIMD-PartialEq.rs deleted file mode 100644 index b22b7f52402..00000000000 --- a/src/test/codegen/issue-83623-SIMD-PartialEq.rs +++ /dev/null @@ -1,46 +0,0 @@ -// This test checks that jumps generated by logical operators can be optimized away - -// compile-flags: -Copt-level=3 -// only-64bit - -#![crate_type="lib"] - -pub struct Blueprint { - pub fuel_tank_size: u32, - pub payload: u32, - pub wheel_diameter: u32, - pub wheel_width: u32, - pub storage: u32, -} - -// && chains should not prevent SIMD optimizations for primitives -impl PartialEq for Blueprint{ - fn eq(&self, other: &Self)->bool{ - // CHECK-NOT: call{{.*}}bcmp - // CHECK-NOT: call{{.*}}memcmp - // CHECK-NOT: br {{.*}} - self.fuel_tank_size == other.fuel_tank_size - && self.payload == other.payload - && self.wheel_diameter == other.wheel_diameter - && self.wheel_width == other.wheel_width - && self.storage == other.storage - } -} - -#[derive(PartialEq)] -pub struct Blueprint2 { - pub fuel_tank_size: u32, - pub payload: u32, - pub wheel_diameter: u32, - pub wheel_width: u32, - pub storage: u32, -} - -// Derived PartialEq should not generate jumps and should use SIMD -#[no_mangle] -pub fn partial_eq_should_not_jump(a: &Blueprint2, b:&Blueprint2)->bool{ - // CHECK-NOT: call{{.*}}bcmp - // CHECK-NOT: call{{.*}}memcmp - // CHECK-NOT: br {{.*}} - a==b -} -- cgit 1.4.1-3-g733a5