ref: 12e0c9055b2b05ffe12a69d77fa3e1c28f2f7e44
parent: 241dafa0454e02e1af7a85f08c6465357402f710
author: Martin Storsjö <[email protected]>
date: Mon Nov 5 06:45:15 EST 2018
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.
--- a/src/ref_mvs.c
+++ b/src/ref_mvs.c
@@ -301,8 +301,8 @@
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 {