From 571aac9fba027513e0d4178b379f815c38fc0fd1 Mon Sep 17 00:00:00 2001 From: Jubilee Young Date: Tue, 11 Jul 2023 17:43:51 -0700 Subject: Add mir-opt3 rev to simd-wide-sum test --- tests/codegen/simd-wide-sum.rs | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'tests/codegen') diff --git a/tests/codegen/simd-wide-sum.rs b/tests/codegen/simd-wide-sum.rs index db2aa20bde7..87ef29b351f 100644 --- a/tests/codegen/simd-wide-sum.rs +++ b/tests/codegen/simd-wide-sum.rs @@ -1,6 +1,11 @@ +// revisions: llvm mir-opt3 // compile-flags: -C opt-level=3 -Z merge-functions=disabled --edition=2021 // only-x86_64 // ignore-debug: the debug assertions get in the way +// [mir-opt3]compile-flags: -Zmir-opt-level=3 +// [mir-opt3]build-pass + +// mir-opt3 is a regression test for https://github.com/rust-lang/rust/issues/98016 #![crate_type = "lib"] #![feature(portable_simd)] -- cgit 1.4.1-3-g733a5 From 7dc049c378743a9e60dccf47143df9c0052bfe2b Mon Sep 17 00:00:00 2001 From: Jubilee Young Date: Tue, 11 Jul 2023 19:17:56 -0700 Subject: Reenable all cases of simd-wide-sum --- tests/codegen/simd-wide-sum.rs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'tests/codegen') diff --git a/tests/codegen/simd-wide-sum.rs b/tests/codegen/simd-wide-sum.rs index 87ef29b351f..3116f9597bc 100644 --- a/tests/codegen/simd-wide-sum.rs +++ b/tests/codegen/simd-wide-sum.rs @@ -52,9 +52,8 @@ pub fn wider_reduce_iter(x: Simd) -> u16 { #[no_mangle] // CHECK-LABEL: @wider_reduce_into_iter pub fn wider_reduce_into_iter(x: Simd) -> u16 { - // FIXME MIR inlining messes up LLVM optimizations. - // WOULD-CHECK: zext <8 x i8> - // WOULD-CHECK-SAME: to <8 x i16> - // WOULD-CHECK: call i16 @llvm.vector.reduce.add.v8i16(<8 x i16> + // CHECK: zext <8 x i8> + // CHECK-SAME: to <8 x i16> + // CHECK: call i16 @llvm.vector.reduce.add.v8i16(<8 x i16> x.to_array().into_iter().map(u16::from).sum() } -- cgit 1.4.1-3-g733a5