From 4cdb2d3dacb167b41c710e9e55ccf80c05d6f3f5 Mon Sep 17 00:00:00 2001 From: dheaton-arm Date: Wed, 1 Sep 2021 15:55:35 +0100 Subject: [PATCH] Merge vector iterators into chain Copyrght (c) 2021, Arm Limited --- cranelift/interpreter/src/step.rs | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/cranelift/interpreter/src/step.rs b/cranelift/interpreter/src/step.rs index 3741b7405a..11671d654f 100644 --- a/cranelift/interpreter/src/step.rs +++ b/cranelift/interpreter/src/step.rs @@ -974,14 +974,7 @@ where let arg0 = extractlanes(&x, vector_type.lane_type())?; let arg1 = extractlanes(&y, vector_type.lane_type())?; let mut result = SimdVec::new(); - for pair in arg0.chunks(2) { - let lhs: V = Value::int(pair[0], vector_type.lane_type())?; - let rhs: V = Value::int(pair[1], vector_type.lane_type())?; - let sum = op(lhs, rhs)?; - let sum = sum.into_int()?; - result.push(sum); - } - for pair in arg1.chunks(2) { + for pair in arg0.chunks(2).chain(arg1.chunks(2)) { let lhs: V = Value::int(pair[0], vector_type.lane_type())?; let rhs: V = Value::int(pair[1], vector_type.lane_type())?; let sum = op(lhs, rhs)?;