From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 112859 invoked by alias); 14 Aug 2019 21:00:39 -0000 Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org Received: (qmail 112635 invoked by uid 89); 14 Aug 2019 21:00:24 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-2.2 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 spammy=HX-Languages-Length:813 X-HELO: gate.crashing.org Received: from gate.crashing.org (HELO gate.crashing.org) (63.228.1.57) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 14 Aug 2019 21:00:23 +0000 Received: from gate.crashing.org (localhost.localdomain [127.0.0.1]) by gate.crashing.org (8.14.1/8.14.1) with ESMTP id x7EL0GOp014470; Wed, 14 Aug 2019 16:00:16 -0500 Received: (from segher@localhost) by gate.crashing.org (8.14.1/8.14.1/Submit) id x7EL0F56014469; Wed, 14 Aug 2019 16:00:15 -0500 Date: Wed, 14 Aug 2019 21:00:00 -0000 From: Segher Boessenkool To: Joseph Myers Cc: Tejas Joshi , gcc@gcc.gnu.org, Martin Jambor , hubicka@ucw.cz Subject: Re: Expansion of narrowing math built-ins into power instructions Message-ID: <20190814210015.GJ31406@gate.crashing.org> References: <20190811165916.GX31406@gate.crashing.org> <20190812175450.GB31406@gate.crashing.org> <20190812215224.GC31406@gate.crashing.org> <20190814072127.GE31406@gate.crashing.org> <20190814202102.GI31406@gate.crashing.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.3i X-IsSubscribed: yes X-SW-Source: 2019-08/txt/msg00104.txt.bz2 On Wed, Aug 14, 2019 at 08:23:27PM +0000, Joseph Myers wrote: > On Wed, 14 Aug 2019, Segher Boessenkool wrote: > > > Does something like > > float d; double a, b, x; > > ... > > d = fadd (a + x, b - x); > > work as wanted, with such a representation? It would simplify (does it?) to > > d = fadd (a, b); > > but is that allowed? > > It's not allowed, but neither is simplifying (a + x) + (b - x) into (a + > b), when contraction isn't allowed. Ah of course. And we already should not do such simplification on RTL, when contraction is disallowed. So yeah it should work fine I think. A new RTL code would be best (it would be silly to have to make an unspec for it in every port separately), but an unspec is of course easiest for now. Segher