From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22717 invoked by alias); 15 Aug 2012 14:02:00 -0000 Received: (qmail 22706 invoked by uid 22791); 15 Aug 2012 14:01:59 -0000 X-SWARE-Spam-Status: No, hits=-4.4 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00,KHOP_THREADED X-Spam-Check-By: sourceware.org Received: from localhost (HELO gcc.gnu.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 15 Aug 2012 14:01:47 +0000 From: "jakub at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/52555] [4.6/4.7/4.8 Regression] ICE unrecognizable insn with -ffast-math and __attribute__((optimize(xx))) Date: Wed, 15 Aug 2012 14:02:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Keywords: ice-on-valid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: jakub at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 4.6.4 X-Bugzilla-Changed-Fields: CC Message-ID: In-Reply-To: References: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2012-08/txt/msg00959.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52555 Jakub Jelinek changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jakub at gcc dot gnu.org --- Comment #3 from Jakub Jelinek 2012-08-15 14:01:34 UTC --- I'd say it is wrong to clear the fast math flags when switching from global state -ffast-math to optimize attrubute -O1 or similar, of course with no outer -ffast-math or -Ofast attribute optimize Ofast should turn fast math options on. How global Ofast with O optimize attribute should behave is another question. Anyway, what happens here is that the ceil[sdx]f2 expanders and others use flag_unsafe_math_optimizations and flag_trapping_math options in their conditions (i.e. HAVE_ceil[sdx]f2 uses those and init_all_optabs sets it). But apparently init_all_optabs is evaluated just once (several times only for really multi targettish targets like mips). Thus it is evaluated when fast math options are on, but during expansion they are off. In this light I'd say it is a target bug to use options that can change between different functions in insn conditions.