From 90b47c517429ab7a0fffd2ba5e64d4737e87125f Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Sat, 19 Nov 2016 19:57:56 +0100 Subject: [PATCH] i386.c (ix86_can_inline_p): Use || instead of & when checking if callee's isa flags are subset of caller's... * 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 | 4 ++++ gcc/config/i386/i386.c | 12 ++++++------ 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index c3c5c16c4814..23de483cc35a 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,9 @@ 2016-11-19 Jakub Jelinek + * 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. diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index 959653757fe4..2db1e897c181 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -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. */ -- 2.47.2