This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: target/17107: Fix
- From: Andrew Pinski <pinskia at physics dot uc dot edu>
- To: Nathan Sidwell <nathan at codesourcery dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>, David Edelsohn <dje at watson dot ibm dot com>
- Date: Tue, 16 Nov 2004 08:05:11 -0500
- Subject: Re: target/17107: Fix
- References: <4199F967.6000405@codesourcery.com>
On Nov 16, 2004, at 7:58 AM, Nathan Sidwell wrote:
*************** fold_truthop (enum tree_code code, tree
*** 4620,4626 ****
that can be merged. Avoid doing this if the RHS is a
floating-point
comparison since those can trap. */
! if (BRANCH_COST >= 2
&& ! FLOAT_TYPE_P (TREE_TYPE (rl_arg))
&& simple_operand_p (rl_arg)
&& simple_operand_p (rr_arg))
--- 4620,4626 ----
that can be merged. Avoid doing this if the RHS is a
floating-point
comparison since those can trap. */
! if (LOGICAL_OP_NON_SHORT_CIRCUIT
&& ! FLOAT_TYPE_P (TREE_TYPE (rl_arg))
&& simple_operand_p (rl_arg)
&& simple_operand_p (rr_arg))
No this is not correct as we what to do the following optimization
still:
(a != 0) || (b != 0) into (a | b) != 0.
Thanks,
Andrew Pinski