From 09b029d82ca1118a5637f8f723491048ebdb6bb6 Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Mon, 3 Jan 2022 23:00:22 +0900 Subject: [PATCH] [simd] Correct result for cmuld I must have had quite the brain-fart when I wrote that. Yay for tests :) --- include/QF/simd/vec2d.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/QF/simd/vec2d.h b/include/QF/simd/vec2d.h index 6b50ea6b4..206e7f18b 100644 --- a/include/QF/simd/vec2d.h +++ b/include/QF/simd/vec2d.h @@ -107,9 +107,9 @@ VISIBLE vec2d_t cmuld (vec2d_t a, vec2d_t b) { - vec2d_t c = a * b[0]; - c = _mm_addsub_pd (c, (vec2d_t) { c[1], c[0] }); - return c; + vec2d_t c1 = a * b[0]; + vec2d_t c2 = a * b[1]; + return _mm_addsub_pd (c1, (vec2d_t) { c2[1], c2[0] }); } #endif//__QF_simd_vec2d_h