From 12e0c9055b2b05ffe12a69d77fa3e1c28f2f7e44 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Storsj=C3=B6?= Date: Mon, 5 Nov 2018 11:45:15 +0200 Subject: arm64: Work around a clang/LLVM misoptimization This avoids a misoptimization in clang, https://bugs.llvm.org/show_bug.cgi?id=39550, where the root cause has been around for a number of years, but a change in LLVM 6.0 allowed for better optimizations, exposing this bug. This bug is on good track to be fixed in LLVM for the 8.0 release and hopefully also for backporting into 7.0.1. It is however present in 6.0, 6.0.1 and 7.0, and other downstream users such as Xcode 10.0/10.1. --- src/ref_mvs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ref_mvs.c b/src/ref_mvs.c index 9c749a9..51fcbc8 100644 --- a/src/ref_mvs.c +++ b/src/ref_mvs.c @@ -301,8 +301,8 @@ static INLINE int is_global_mv_block(const MB_MODE_INFO *const mbmi, const BLOCK_SIZE bsize = mbmi->sb_type; const int block_size_allowed = AOMMIN(block_size_wide[bsize], block_size_high[bsize]) >= 8; - return (mode == GLOBALMV || mode == GLOBAL_GLOBALMV) && type > TRANSLATION && - block_size_allowed; + return block_size_allowed && type > TRANSLATION && + (mode == GLOBALMV || mode == GLOBAL_GLOBALMV); } typedef struct { -- cgit v1.2.3