From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate.crashing.org (gate.crashing.org [63.228.1.57]) by sourceware.org (Postfix) with ESMTP id A48CB3858402 for ; Fri, 28 Jan 2022 20:33:53 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org A48CB3858402 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=kernel.crashing.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=kernel.crashing.org Received: from gate.crashing.org (localhost.localdomain [127.0.0.1]) by gate.crashing.org (8.14.1/8.14.1) with ESMTP id 20SKWqZH003122; Fri, 28 Jan 2022 14:32:53 -0600 Received: (from segher@localhost) by gate.crashing.org (8.14.1/8.14.1/Submit) id 20SKWq0o003121; Fri, 28 Jan 2022 14:32:52 -0600 X-Authentication-Warning: gate.crashing.org: segher set sender to segher@kernel.crashing.org using -f Date: Fri, 28 Jan 2022 14:32:52 -0600 From: Segher Boessenkool To: Bill Schmidt Cc: gcc-patches@gcc.gnu.org, dje.gcc@gmail.com Subject: Re: [PATCH 2/8] rs6000: Don't #ifdef "short" built-in names Message-ID: <20220128203252.GH614@gate.crashing.org> References: <68d0e1d61ff7834c90b598a17266cb5fbb60a77c.1643390744.git.wschmidt@linux.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <68d0e1d61ff7834c90b598a17266cb5fbb60a77c.1643390744.git.wschmidt@linux.ibm.com> User-Agent: Mutt/1.4.2.3i X-Spam-Status: No, score=-3.4 required=5.0 tests=BAYES_00, JMQ_SPF_NEUTRAL, KAM_DMARC_STATUS, SPF_HELO_PASS, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Jan 2022 20:33:54 -0000 On Fri, Jan 28, 2022 at 11:50:20AM -0600, Bill Schmidt wrote: > It was recently pointed out that we get anomalous behavior when using > __attribute__((target)) to select a CPU. As an example, when building for > -mcpu=power8 but using __attribute__((target("mcpu=power10")), it is legal > to call __builtin_vec_mod, but not vec_mod, even though these are > equivalent. This is because the equivalence is established with a #define > that is guarded by #ifdef _ARCH_PWR10. Yeah that is bad. > This goofy behavior occurs with both the old builtins support and the > new. One of the goals of the new builtins support was to make sure all > appropriate interfaces are available using __attribute__((target)), so I > failed in this respect. This patch corrects the problem by removing the > apply. For example, #ifdef __PPU__ is still appropriate. "By removing the apply"... What does that mean? Nice cleanup (and nice bugfix of course). Okay for trunk (with that comment improved a bit perhaps). Thanks! Segher