This is the mail archive of the gcc-cvs@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]

r242750 - in /trunk/gcc: ChangeLog fold-const.c...


Author: amker
Date: Wed Nov 23 12:44:08 2016
New Revision: 242750

URL: https://gcc.gnu.org/viewcvs?rev=242750&root=gcc&view=rev
Log:
	* fold-const.c (fold_cond_expr_with_comparison): Move simplification
	for A cmp C1 ? A : C2 to below, also simplify remaining code.
	* match.pd: Move and extend simplification from above to here:
	(cond (cmp (convert1? x) c1) (convert2? x) c2) -> (minmax (x c)).
	* tree-if-conv.c (ifcvt_follow_ssa_use_edges): New func.
	(predicate_scalar_phi): Call fold_stmt using the new valueize func.

	gcc/testsuite
	* gcc.dg/fold-cond_expr-1.c: New test.
	* gcc.dg/fold-condcmpconv-1.c: New test.
	* gcc.dg/fold-condcmpconv-2.c: New test.

Added:
    trunk/gcc/testsuite/gcc.dg/fold-cond_expr-1.c
    trunk/gcc/testsuite/gcc.dg/fold-condcmpconv-1.c
    trunk/gcc/testsuite/gcc.dg/fold-condcmpconv-2.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/fold-const.c
    trunk/gcc/match.pd
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/testsuite/gcc.dg/tree-ssa/pr66726.c
    trunk/gcc/tree-if-conv.c


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