Fix search_line_fast for aarch64/ILP32
authorAndreas Schwab <schwab@suse.de>
Tue, 21 Mar 2017 11:10:17 +0000 (11:10 +0000)
committerAndreas Schwab <schwab@gcc.gnu.org>
Tue, 21 Mar 2017 11:10:17 +0000 (11:10 +0000)
* lex.c (search_line_fast) [__ARM_NEON && __ARM_64BIT_STATE]:
Convert 64-bit value to boolean before passing to
__builtin_expect.

From-SVN: r246312

libcpp/ChangeLog
libcpp/lex.c

index 5c4b7a0..95200da 100644 (file)
@@ -1,3 +1,9 @@
+2017-03-21  Andreas Schwab  <schwab@suse.de>
+
+       * lex.c (search_line_fast) [__ARM_NEON && __ARM_64BIT_STATE]:
+       Convert 64-bit value to boolean before passing to
+       __builtin_expect.
+
 2017-03-16  Jason Merrill  <jason@redhat.com>
 
        * init.c (cpp_init_builtins): Update __cplusplus for C++17.
index 8a8c79c..a431ac8 100644 (file)
@@ -821,7 +821,7 @@ search_line_fast (const uchar *s, const uchar *end ATTRIBUTE_UNUSED)
       v = vorrq_u8 (t, vceqq_u8 (data, repl_bs));
       w = vorrq_u8 (u, vceqq_u8 (data, repl_qm));
       t = vorrq_u8 (v, w);
-      if (__builtin_expect (vpaddd_u64 ((uint64x2_t)t), 0))
+      if (__builtin_expect (vpaddd_u64 ((uint64x2_t)t) != 0, 0))
        goto done;
     }