2018-01-08 Richard Biener <rguenther@suse.de>
PR middle-end/83517
* match.pd ((t * 2) / 2) -> t): Add missing :c.
* gcc.dg/pr83517.c: New testcase.
From-SVN: r256328
+2018-01-08 Richard Biener <rguenther@suse.de>
+
+ PR middle-end/83517
+ * match.pd ((t * 2) / 2) -> t): Add missing :c.
+
2018-01-06 Aldy Hernandez <aldyh@redhat.com>
PR middle-end/81897
/* Simplify (t * 2) / 2) -> t. */
(for div (trunc_div ceil_div floor_div round_div exact_div)
(simplify
- (div (mult @0 @1) @1)
+ (div (mult:c @0 @1) @1)
(if (ANY_INTEGRAL_TYPE_P (type)
&& TYPE_OVERFLOW_UNDEFINED (type))
@0)))
+2018-01-08 Richard Biener <rguenther@suse.de>
+
+ PR middle-end/83517
+ * gcc.dg/pr83517.c: New testcase.
+
2018-01-06 Aldy Hernandez <aldyh@redhat.com>
PR middle-end/81897
--- /dev/null
+/* { dg-do compile } */
+/* { dg-options "-fdump-tree-original" } */
+
+int test(int x)
+{
+ return (x+x)/x;
+}
+
+/* { dg-final { scan-tree-dump "return 2;" "original" } } */