aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Biener <rguenther@suse.de>2014-12-02 09:03:44 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2014-12-02 09:03:44 +0000
commit280931058a2f5beb7cebef0d5a0a6491c182cfb4 (patch)
tree75f8b5429630a70ed6a887cb3929dbb52ef991ab
parente1b7f42ec66b9a00db2b30f1e00b707bbad9f452 (diff)
downloadgcc-280931058a2f5beb7cebef0d5a0a6491c182cfb4.zip
gcc-280931058a2f5beb7cebef0d5a0a6491c182cfb4.tar.gz
gcc-280931058a2f5beb7cebef0d5a0a6491c182cfb4.tar.bz2
match.pd: Restrict division combining to trunc_div and exact_div.
2014-12-02 Richard Biener <rguenther@suse.de> * match.pd: Restrict division combining to trunc_div and exact_div. From-SVN: r218260
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/match.pd5
2 files changed, 8 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 8924c7a..aed08f4 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2014-12-02 Richard Biener <rguenther@suse.de>
+
+ * match.pd: Restrict division combining to trunc_div and
+ exact_div.
+
2014-12-02 Jakub Jelinek <jakub@redhat.com>
* config/sparc/sparc.c (sparc_atomic_assign_expand_fenv):
diff --git a/gcc/match.pd b/gcc/match.pd
index ee9bbc6..b36aa2f 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 {