i386.c (ix86_can_inline_p): Use || instead of & when checking if callee's isa flags...
authorJakub Jelinek <jakub@redhat.com>
Sat, 19 Nov 2016 18:57:56 +0000 (19:57 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Sat, 19 Nov 2016 18:57:56 +0000 (19:57 +0100)
* config/i386/i386.c (ix86_can_inline_p): Use || instead of &
when checking if callee's isa flags are subset of caller's isa flags.
Fix comment wording.

From-SVN: r242628

gcc/ChangeLog
gcc/config/i386/i386.c

index c3c5c16..23de483 100644 (file)
@@ -1,5 +1,9 @@
 2016-11-19  Jakub Jelinek  <jakub@redhat.com>
 
+       * config/i386/i386.c (ix86_can_inline_p): Use || instead of &
+       when checking if callee's isa flags are subset of caller's isa flags.
+       Fix comment wording.
+
        * config/i386/i386.c (ix86_valid_target_attribute_tree): Don't
        clear opts->x_ix86_isa_flags, clear opts->x_ix86_isa_flags2
        instead and using = 0 instead of &= 0.
index 9596537..2db1e89 100644 (file)
@@ -6981,13 +6981,13 @@ ix86_can_inline_p (tree caller, tree callee)
       struct cl_target_option *caller_opts = TREE_TARGET_OPTION (caller_tree);
       struct cl_target_option *callee_opts = TREE_TARGET_OPTION (callee_tree);
 
-      /* Callee's isa options should a subset of the caller's, i.e. a SSE4 function
-        can inline a SSE2 function but a SSE2 function can't inline a SSE4
-        function.  */
+      /* Callee's isa options should be a subset of the caller's, i.e. a SSE4
+        function can inline a SSE2 function but a SSE2 function can't inline
+        a SSE4 function.  */
       if (((caller_opts->x_ix86_isa_flags & callee_opts->x_ix86_isa_flags)
-         != callee_opts->x_ix86_isa_flags) &
-         ((caller_opts->x_ix86_isa_flags2 & callee_opts->x_ix86_isa_flags2)
-         != callee_opts->x_ix86_isa_flags2))
+          != callee_opts->x_ix86_isa_flags)
+         || ((caller_opts->x_ix86_isa_flags2 & callee_opts->x_ix86_isa_flags2)
+             != callee_opts->x_ix86_isa_flags2))
        ret = false;
 
       /* See if we have the same non-isa options.  */