From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12577 invoked by alias); 17 Oct 2007 14:32:06 -0000 Received: (qmail 12486 invoked by uid 48); 17 Oct 2007 14:31:51 -0000 Date: Wed, 17 Oct 2007 14:32:00 -0000 Message-ID: <20071017143151.12485.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug target/33794] [4.3 regression] Wrong code w/ -ffast-math In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "ubizjak at gmail dot com" 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: 2007-10/txt/msg01538.txt.bz2 ------- Comment #13 from ubizjak at gmail dot com 2007-10-17 14:31 ------- Proposed patch in testing: Index: reg-stack.c =================================================================== --- reg-stack.c (revision 129402) +++ reg-stack.c (working copy) @@ -1085,11 +1085,13 @@ special case with i387 UNSPEC_TAN, where destination is live (an argument to fptan) but inherent load of 1.0 is modelled as a load from a constant. */ - if (! (GET_CODE (pat) == PARALLEL - && XVECLEN (pat, 0) == 2 - && GET_CODE (XVECEXP (pat, 0, 1)) == SET - && GET_CODE (SET_SRC (XVECEXP (pat, 0, 1))) == UNSPEC - && XINT (SET_SRC (XVECEXP (pat, 0, 1)), 1) == UNSPEC_TAN)) + if (GET_CODE (pat) == PARALLEL + && XVECLEN (pat, 0) == 2 + && GET_CODE (XVECEXP (pat, 0, 1)) == SET + && GET_CODE (SET_SRC (XVECEXP (pat, 0, 1))) == UNSPEC + && XINT (SET_SRC (XVECEXP (pat, 0, 1)), 1) == UNSPEC_TAN) + emit_swap_insn (insn, regstack, dest); + else gcc_assert (get_hard_regnum (regstack, dest) < FIRST_STACK_REG); gcc_assert (regstack->top < REG_STACK_SIZE); -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33794