about summary refs log tree commit diff
path: root/tests/codegen/array-map.rs
diff options
context:
space:
mode:
authorJubilee Young <workingjubilee@gmail.com>2023-05-30 00:34:50 -0700
committerJubilee Young <workingjubilee@gmail.com>2023-05-30 00:40:39 -0700
commit472230d192b8bace6ddbe825d68ccd27d0d5ef1d (patch)
treea4f10140d7833692e52bf4425f417fdff61ca256 /tests/codegen/array-map.rs
parent165cddafe9449e090fdef2686045385b55a87329 (diff)
downloadrust-472230d192b8bace6ddbe825d68ccd27d0d5ef1d.tar.gz
rust-472230d192b8bace6ddbe825d68ccd27d0d5ef1d.zip
Remove array_zip
`[T; N]::zip` is "eager" but most zips are mapped.
This causes poor optimization in generated code.
This is a fundamental design issue and "zip" is
"prime real estate" in terms of function names,
so let's free it up again.
Diffstat (limited to 'tests/codegen/array-map.rs')
-rw-r--r--tests/codegen/array-map.rs11
1 files changed, 0 insertions, 11 deletions
diff --git a/tests/codegen/array-map.rs b/tests/codegen/array-map.rs
index 3706ddf99fd..24f3f43d078 100644
--- a/tests/codegen/array-map.rs
+++ b/tests/codegen/array-map.rs
@@ -4,7 +4,6 @@
 // ignore-debug (the extra assertions get in the way)
 
 #![crate_type = "lib"]
-#![feature(array_zip)]
 
 // CHECK-LABEL: @short_integer_map
 #[no_mangle]
@@ -16,16 +15,6 @@ pub fn short_integer_map(x: [u32; 8]) -> [u32; 8] {
     x.map(|x| 2 * x + 1)
 }
 
-// CHECK-LABEL: @short_integer_zip_map
-#[no_mangle]
-pub fn short_integer_zip_map(x: [u32; 8], y: [u32; 8]) -> [u32; 8] {
-    // CHECK: %[[A:.+]] = load <8 x i32>
-    // CHECK: %[[B:.+]] = load <8 x i32>
-    // CHECK: sub <8 x i32> %[[B]], %[[A]]
-    // CHECK: store <8 x i32>
-    x.zip(y).map(|(x, y)| x - y)
-}
-
 // This test is checking that LLVM can SRoA away a bunch of the overhead,
 // like fully moving the iterators to registers.  Notably, previous implementations
 // of `map` ended up `alloca`ing the whole `array::IntoIterator`, meaning both a