From: Richard Biener Date: Tue, 2 Dec 2014 09:03:44 +0000 (+0000) Subject: match.pd: Restrict division combining to trunc_div and exact_div. X-Git-Tag: releases/gcc-5.1.0~2678 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=280931058a2f5beb7cebef0d5a0a6491c182cfb4;p=thirdparty%2Fgcc.git match.pd: Restrict division combining to trunc_div and exact_div. 2014-12-02 Richard Biener * match.pd: Restrict division combining to trunc_div and exact_div. From-SVN: r218260 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 8924c7aa95ee..aed08f432991 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2014-12-02 Richard Biener + + * match.pd: Restrict division combining to trunc_div and + exact_div. + 2014-12-02 Jakub Jelinek * config/sparc/sparc.c (sparc_atomic_assign_expand_fenv): diff --git a/gcc/match.pd b/gcc/match.pd index ee9bbc65fafe..b36aa2fe76a3 100644 --- a/gcc/match.pd +++ b/gcc/match.pd @@ -129,8 +129,9 @@ along with GCC; see the file COPYING3. If not see && TYPE_UNSIGNED (type)) (trunc_div @0 @1))) -/* Combine two successive divisions. */ -(for div (trunc_div ceil_div floor_div round_div exact_div) +/* Combine two successive divisions. Note that combining ceil_div + and floor_div is trickier and combining round_div even more so. */ +(for div (trunc_div exact_div) (simplify (div (div @0 INTEGER_CST@1) INTEGER_CST@2) (with {