This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: target/17107: Fix



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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]