Commit 95765f36 by Naveen H.S Committed by Naveen H.S

re PR middle-end/25529 ((unsigned * 2)/2 is not changed into unsigned &0x7FFFFFFF)

2015-08-13  Naveen H.S  <Naveen.Hurugalawadi@caviumnetworks.com>

	PR middle-end/25529
	* match.pd (div (mult @0 @1) @1) : New simplifier.

From-SVN: r226847
parent b02520e9
2015-08-13 Naveen H.S <Naveen.Hurugalawadi@caviumnetworks.com>
PR middle-end/25529
* match.pd (div (mult @0 @1) @1) : New simplifier.
2015-08-12 Michael Meissner <meissner@linux.vnet.ibm.com>
PR target/67071
......
......@@ -296,6 +296,14 @@ along with GCC; see the file COPYING3. If not see
(if (TYPE_UNSIGNED (TREE_TYPE (@0)))
(bit_and @0 (negate @1))))
/* Simplify (t * 2) / 2) -> t. */
(for div (trunc_div ceil_div floor_div round_div exact_div)
(simplify
(div (mult @0 @1) @1)
(if (ANY_INTEGRAL_TYPE_P (type)
&& TYPE_OVERFLOW_UNDEFINED (type))
@0)))
/* X % Y is smaller than Y. */
(for cmp (lt ge)
(simplify
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment