From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 10AEA3945C18; Mon, 6 Apr 2020 14:04:40 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 10AEA3945C18 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1586181880; bh=BBZlAJiFoZ5V7ZvLngas9+7iv+UWSuEWlqXjDPFYeaA=; h=From:To:Subject:Date:In-Reply-To:References:From; b=RVPv93iYx/W/K4NzgB3jMWSEaurhARuxZweYgvJO2Zs+ZyI3Zocf+EIG6ekDsh8tZ Ptye+XcnCgmL/quZBPHX+1ttB/4M0bNTOfi+pL5sqvfkoqy0iJwa0oj8IXUdoXaAR1 x/7iGNbm79YM7xe2yAig0cumsu5/SvIxhTlihcMI= From: "grasland at lal dot in2p3.fr" To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/94497] Branchless clamp in the general case gets a branch in a particular case ? Date: Mon, 06 Apr 2020 14:04:39 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: middle-end X-Bugzilla-Version: 10.0 X-Bugzilla-Keywords: missed-optimization X-Bugzilla-Severity: normal X-Bugzilla-Who: grasland at lal dot in2p3.fr X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Apr 2020 14:04:40 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D94497 --- Comment #5 from Hadrien Grasland --- Thanks for the clarifications! We could probably live with -fno-signed-zero= s, but I think -ffinite-math-only would be too much as an application-wide fla= g, as I've spotted several occurences of the "do the computation, then check if the result is normal" pattern around... I tried to experiment with #pragma optimize as a finer-grained alternative = to a global fast-math flag, which would probably be acceptable. But that seemed = to have the side-effect of preventing inlining of the functions to which the attributes are applied into other functions that don't have it (I guess that attribute is implemented by splitting the code into multiple compilation units?), whereas in this part of the codebase we want all the inlining we c= an get... So since I don't have the skills and time to work on GCC myself, I guess I = will need to wait for now and see what you come up with.=