Commit 590e9a42 by Uros Bizjak Committed by Uros Bizjak

re PR middle-end/33794 (Wrong code w/ -ffast-math)

	PR middle-end/33794
	* reg-stack.c (move_for_stack_reg): Swap input argument of
	UNSPEC_TAN insn to the top of the stack.

From-SVN: r129406
parent 13d71644
2007-10-17 Uros Bizjak <ubizjak@gmail.com>
PR middle-end/33794
* reg-stack.c (move_for_stack_reg): Swap input argument of
UNSPEC_TAN insn to the top of the stack.
2007-10-17 Uros Bizjak <ubizjak@gmail.com>
PR target/32961
* config/i386/i386.c (ix86_expand_builtin) [IX86_BUILTIN_PSLLWI128,
IX86_BUILTIN_PSLLDI128, BUILTIN_PSLLQI128, IX86_BUILTIN_PSRAWI128,
......@@ -1085,11 +1085,13 @@ move_for_stack_reg (rtx insn, stack regstack, rtx pat)
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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment