From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from arjuna.pair.com (arjuna.pair.com [209.68.5.131]) by sourceware.org (Postfix) with ESMTPS id CECFF385840D for ; Tue, 23 Apr 2024 15:38:53 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org CECFF385840D Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=bitrange.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=bitrange.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org CECFF385840D Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=209.68.5.131 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1713886737; cv=none; b=LK1DvxYLEgFSEPCNQsocPJi6MQN+UsyDrCIFpz1IZPtp3SEnosycFx00Z1G+1h9Ojarem0nERuXKPCjCA9L7FxckHinT6I2d5PGMUzNZNpU+4VufMDB1LB1V9wZlBq8nYUgSom59ISPoBTP4HE8OucG0IMbhLJpg1nn4gAIV0Yo= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1713886737; c=relaxed/simple; bh=CZ7D++PRpLre2lgebZVzJisJq2t4verVywQDLObI/e0=; h=Date:From:To:Subject:Message-ID:MIME-Version; b=P6kCxhLlDj1J+384CRR1DPQQVFDeE7U0NiCSAtu5wP4YzIczx60udJm83q4lQ4nLXi2dxSXY4jIA3xczNlpgvNZBF00V+2szhpAjYaYZ9xVQL0Jl7d/yDcHfHNvedi+BmL6nH3ypwqacx64vtdmH5h4+wagrS/cS+MwilQIQ+ss= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by arjuna.pair.com (Postfix, from userid 3006) id 3EA3E8A784; Tue, 23 Apr 2024 11:38:53 -0400 (EDT) Received: from localhost (localhost [127.0.0.1]) by arjuna.pair.com (Postfix) with ESMTP id 3E2D88A76D; Tue, 23 Apr 2024 11:38:53 -0400 (EDT) Date: Tue, 23 Apr 2024 11:38:53 -0400 (EDT) From: Hans-Peter Nilsson X-X-Sender: hp@arjuna.pair.com To: Alexandre Oliva cc: gcc-patches@gcc.gnu.org, Rainer Orth , Mike Stump Subject: Re: enable sqrt insns for cdce3.c In-Reply-To: Message-ID: References: User-Agent: Alpine 2.20.16 (BSF 172 2016-09-29) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Scanned-By: mailmunge 3.11 on 209.68.5.131 X-Spam-Status: No, score=-3.9 required=5.0 tests=BAYES_00,KAM_DMARC_STATUS,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On Mon, 22 Apr 2024, Alexandre Oliva wrote: > [Revamped version of this patch, combined with others, to follow] > > On Mar 10, 2021, Hans-Peter Nilsson wrote: Time flies... > > On Wed, 10 Mar 2021, Alexandre Oliva wrote: > Is mmix a sqrt_insn effective target? proc > check_effective_target_sqrt_insn in > gcc/testsuite/lib/target-supports.exp suggests it shouldn't pass, so I'm > surprised it would still try to run the test despite the added > /* { dg-require-effective-target sqrt_insn } */ directive. The effective-target sqrt_insn predicate says "supports hardware square root instructions" and doesn't make a difference between sqrtdf2 (double) and sqrtsf3 (float). I'm extrapolating that the "divine meaning" of the comment is that such an instruction must be present for all supported floating-point modes for the predicate to yield true (when the predicate is correctly implemented). (We could also fix the predicate description to actually say "for all floating-point modes" and/or split the predicate into mode-specific variants, etc. ;-) MMIX has sqrtdf2 but not sqrtsf2, and the latter is what's used in cdce3.c. > cdce3 is supposed to shrink-wrap the sqrtf(x) call into something like > (x >= 0 ? .SQRT(x) : sqrtf(x)), where .SQRT stands for a square root > instruction. ...for 32-bit single floats. > Since we don't know why it still runs for you, I'm keeping the mmix > explicit skip in the new version of the patch. Thanks, that does seem like TRT. brgds, H-P