fold-const.c (fold_cond_expr_with_comparison): New function, extracted from fold.
authorPaolo Bonzini <bonzini@gnu.org>
Mon, 21 Jun 2004 08:34:12 +0000 (08:34 +0000)
committerPaolo Bonzini <bonzini@gcc.gnu.org>
Mon, 21 Jun 2004 08:34:12 +0000 (08:34 +0000)
commit2c486ea78cfcbd4b05c7845db23647fe2bf61d6d
tree9aa35f475aa9c3a7ad4403b4e6b48555f71e3187
parent992d907d5caac2269f88788826824df7914fc3ef
fold-const.c (fold_cond_expr_with_comparison): New function, extracted from fold.

2004-06-21  Paolo Bonzini  <bonzini@gnu.org>

* fold-const.c (fold_cond_expr_with_comparison):
New function, extracted from fold.
(fold): Extract code to fold A op B ? A : C, use
it to fold A op B ? C : A.  Really optimize
A & N ? N : 0 where N is a power of two.  Avoid
relying on canonicalization and recursion for
foldings of COND_EXPR to happen.

From-SVN: r83428
gcc/ChangeLog
gcc/fold-const.c