From d90bb779cae5c5a6754b44680c52cef5e11bd9bf Mon Sep 17 00:00:00 2001 From: Henry de Valence Date: Wed, 14 Nov 2018 12:36:34 -0800 Subject: [PATCH] Delay all computations using x[0], y[0] Since computation of the 0 term in reduction requires a multiplication with a 4-cycle latency, this ensures that the rest of the computation can start before the 0 term is finished --- src/backend/vector/ifma/field.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/backend/vector/ifma/field.rs b/src/backend/vector/ifma/field.rs index 8fdb629..12a72f4 100644 --- a/src/backend/vector/ifma/field.rs +++ b/src/backend/vector/ifma/field.rs @@ -197,8 +197,8 @@ impl<'a, 'b> Mul<&'b F51x4Reduced> for &'a F51x4Reduced { let mut z9hi = u64x4::splat(0); // Wave 0 - z4lo = madd52lo(z4lo, x[4], y[0]); - z5hi = madd52hi(z5hi, x[4], y[0]); + z4lo = madd52lo(z4lo, x[2], y[2]); + z5hi = madd52hi(z5hi, x[2], y[2]); z5lo = madd52lo(z5lo, x[4], y[1]); z6hi = madd52hi(z6hi, x[4], y[1]); z6lo = madd52lo(z6lo, x[4], y[2]); @@ -219,8 +219,8 @@ impl<'a, 'b> Mul<&'b F51x4Reduced> for &'a F51x4Reduced { // Wave 2 z8lo = madd52lo(z8lo, x[4], y[4]); z9hi = madd52hi(z9hi, x[4], y[4]); - z4lo = madd52lo(z4lo, x[2], y[2]); - z5hi = madd52hi(z5hi, x[2], y[2]); + z4lo = madd52lo(z4lo, x[4], y[0]); + z5hi = madd52hi(z5hi, x[4], y[0]); z5lo = madd52lo(z5lo, x[2], y[3]); z6hi = madd52hi(z6hi, x[2], y[3]); z6lo = madd52lo(z6lo, x[2], y[4]);