[Bug target/33794] [4.3 regression] Wrong code w/ -ffast-math
ubizjak at gmail dot com
gcc-bugzilla@gcc.gnu.org
Wed Oct 17 14:32:00 GMT 2007
------- 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
More information about the Gcc-bugs
mailing list