1d9acb4
Upstream-Status: Submitted
1d9acb4
1d9acb4
GCC aarch64 build fix [this is actually a libvpx patch, not a Chromium one]
1d9acb4
1d9acb4
Sent to: https://chromium-review.googlesource.com/c/webm/libvpx/+/1136449
1d9acb4
1d9acb4
Signed-off-by: Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com>
1d9acb4
---
1d9acb4
From c20bd394f18c47bf133b51d6a40399273c3f24e0 Mon Sep 17 00:00:00 2001
1d9acb4
From: Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com>
1d9acb4
Date: Fri, 13 Jul 2018 14:29:09 +0200
1d9acb4
Subject: [PATCH] vpx_sum_squares_2d_i16_neon(): Make |s2| a uint64x1_t.
1d9acb4
1d9acb4
This fixes the build with at least GCC 7.3, where it was previously failing
1d9acb4
with:
1d9acb4
1d9acb4
../../third_party/libvpx/source/libvpx/vpx_dsp/arm/sum_squares_neon.c: In function 'vpx_sum_squares_2d_i16_neon':
1d9acb4
../../third_party/libvpx/source/libvpx/vpx_dsp/arm/sum_squares_neon.c:34:5: note: use -flax-vector-conversions to permit conversions between vectors with differing element types or numbers of subparts
1d9acb4
     s2 = vpaddl_u32(s1);
1d9acb4
     ^~
1d9acb4
../../third_party/libvpx/source/libvpx/vpx_dsp/arm/sum_squares_neon.c:34:8: error: incompatible types when assigning to type 'int64x1_t' from type 'uint64x1_t'
1d9acb4
     s2 = vpaddl_u32(s1);
1d9acb4
        ^
1d9acb4
../../third_party/libvpx/source/libvpx/vpx_dsp/arm/sum_squares_neon.c:81:8: error: incompatible types when assigning to type 'int64x1_t' from type 'uint64x1_t'
1d9acb4
     s2 = vadd_u64(vget_low_u64(s1), vget_high_u64(s1));
1d9acb4
        ^
1d9acb4
../../third_party/libvpx/source/libvpx/vpx_dsp/arm/sum_squares_neon.c:84:24: error: incompatible type for argument 1 of 'vget_lane_u64'
1d9acb4
   return vget_lane_u64(s2, 0);
1d9acb4
                        ^~
1d9acb4
1d9acb4
The generated assembly was verified to remain identical with both GCC and
1d9acb4
LLVM.
1d9acb4
1d9acb4
Change-Id: I2778428ee1fee0a674d0d4910347c2a717de21ac
1d9acb4
---
1d9acb4
 vpx_dsp/arm/sum_squares_neon.c | 2 +-
1d9acb4
 1 file changed, 1 insertion(+), 1 deletion(-)
1d9acb4
1d9acb4
diff --git a/vpx_dsp/arm/sum_squares_neon.c b/vpx_dsp/arm/sum_squares_neon.c
1d9acb4
index 8942ba83b..cfefad993 100644
1d9acb4
--- a/third_party/libvpx/source/libvpx/vpx_dsp/arm/sum_squares_neon.c
1d9acb4
+++ b/third_party/libvpx/source/libvpx/vpx_dsp/arm/sum_squares_neon.c
1d9acb4
@@ -14,7 +14,7 @@
1d9acb4
 #include "./vpx_dsp_rtcd.h"
1d9acb4
 
1d9acb4
 uint64_t vpx_sum_squares_2d_i16_neon(const int16_t *src, int stride, int size) {
1d9acb4
-  int64x1_t s2;
1d9acb4
+  uint64x1_t s2;
1d9acb4
 
1d9acb4
   if (size == 4) {
1d9acb4
     int16x4_t s[4];
1d9acb4
-- 
1d9acb4
2.14.4
1d9acb4