From 96ef7ab1b2008c51983c9ec60f4d4e02fed8954a Mon Sep 17 00:00:00 2001 From: Sreelakshmi Haridas Maruthur Date: Thu, 16 May 2024 14:12:58 -0600 Subject: [PATCH] basic: Rewrite loop to prevent optimizations in MSVC --- test_conformance/basic/test_vector_swizzle.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/test_conformance/basic/test_vector_swizzle.cpp b/test_conformance/basic/test_vector_swizzle.cpp index fdbc891967..6bdf651dd1 100644 --- a/test_conformance/basic/test_vector_swizzle.cpp +++ b/test_conformance/basic/test_vector_swizzle.cpp @@ -516,8 +516,7 @@ static void makeReference(std::vector& ref) // single channel lvalue for (size_t i = 0; i < N; i++) { - ref[dstIndex * S + i] = 0; - ++dstIndex; + ref[dstIndex++ * S + i] = 0; } // normal lvalue