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: fold-const patch for PR41442


On Sat, Apr 24, 2010 at 7:39 PM, Bernd Schmidt <bernds@codesourcery.com> wrote:
> This implements the folding requested in PR41442, i.e.:
>
> ?if ((p1->next && !p2->next) || p2->next)
>
> to
>
> ?if (p1->next || p2->next)
>
> Bootstrapped and regression tested on i686-linux. ?Ok?

+  if (TREE_SIDE_EFFECTS (op) || TREE_SIDE_EFFECTS (cmpop))
+    return 0;
+
+  if (TREE_CODE_CLASS (code) != tcc_comparison)
+    return 0;

use NULL_TREE.

Ok with that change.

Thanks,
Richard.

>
> Bernd
>


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