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 5c4b7a09f09fe15b8d29883380c39f92ccabcb03..95200dacbda730948772b08ec22c29b46162e71c 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 8a8c79cde75bc73ee0de293061ea63a25062bc79..a431ac8e0526f6b564cdb39bab7de0f166e0d0fa 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;
     }