summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Zern <jzern@google.com>2023-05-23 15:48:10 -0700
committerJames Zern <jzern@google.com>2023-05-23 15:51:56 -0700
commit62d09a3e94ef2ce0091b6a8e3a298851657c6891 (patch)
tree7edbadc891bec8b2810c60f7b18df4b6fc388bdc
parent7a5f328a6656bc09ff23031e344c94aa61012909 (diff)
downloadlibvpx-62d09a3e94ef2ce0091b6a8e3a298851657c6891.tar
libvpx-62d09a3e94ef2ce0091b6a8e3a298851657c6891.tar.gz
libvpx-62d09a3e94ef2ce0091b6a8e3a298851657c6891.tar.bz2
libvpx-62d09a3e94ef2ce0091b6a8e3a298851657c6891.zip
fdct8x8_test.cc: work around VS2022 Arm64 issue
cl.exe targeting AArch64 with optimizations enabled produces invalid code in RunExtremalCheck() and RunInvAccuracyCheck(). See: https://developercommunity.visualstudio.com/t/1770-preview-1:-Misoptimization-for-AR/10369786 Bug: b/277255076 Bug: webm:1788 Change-Id: Id2c60f3948d8f788c78602aea1b5232133415dea
-rw-r--r--test/fdct8x8_test.cc12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/fdct8x8_test.cc b/test/fdct8x8_test.cc
index fcc84690a..21f8dcffa 100644
--- a/test/fdct8x8_test.cc
+++ b/test/fdct8x8_test.cc
@@ -132,6 +132,15 @@ void idct8x8_64_add_12_sse2(const tran_low_t *in, uint8_t *out, int stride) {
#endif // HAVE_SSE2
#endif // CONFIG_VP9_HIGHBITDEPTH
+// Visual Studio 2022 (cl.exe) targeting AArch64 with optimizations enabled
+// produces invalid code in RunExtremalCheck() and RunInvAccuracyCheck().
+// See:
+// https://developercommunity.visualstudio.com/t/1770-preview-1:-Misoptimization-for-AR/10369786
+// TODO(jzern): check the compiler version after a fix for the issue is
+// released.
+#if defined(_MSC_VER) && defined(_M_ARM64) && !defined(__clang__)
+#pragma optimize("", off)
+#endif
class FwdTrans8x8TestBase {
public:
virtual ~FwdTrans8x8TestBase() {}
@@ -523,6 +532,9 @@ class FwdTrans8x8TestBase {
vpx_bit_depth_t bit_depth_;
int mask_;
};
+#if defined(_MSC_VER) && defined(_M_ARM64) && !defined(__clang__)
+#pragma optimize("", on)
+#endif
class FwdTrans8x8DCT : public FwdTrans8x8TestBase,
public ::testing::TestWithParam<Dct8x8Param> {