Commit 9ff6fb6e by Marc Glisse Committed by Marc Glisse

match.pd: Revert a * (1 << b) relaxation.

2016-08-31  Marc Glisse  <marc.glisse@inria.fr>

	PR tree-optimization/73714
gcc/
	* match.pd (a * (1 << b)): Revert change from 2016-05-23.
gcc/testsuite/
	* gcc.dg/tree-ssa/pr73714.c: New test.

From-SVN: r239902
parent 8e95a674
2016-08-31 Marc Glisse <marc.glisse@inria.fr>
PR tree-optimization/73714
* match.pd (a * (1 << b)): Revert change from 2016-05-23.
2016-08-31 David Malcolm <dmalcolm@redhat.com> 2016-08-31 David Malcolm <dmalcolm@redhat.com>
* selftest.c: Move "namespace selftest {" to top of file, * selftest.c: Move "namespace selftest {" to top of file,
......
...@@ -468,8 +468,7 @@ DEFINE_INT_AND_FLOAT_ROUND_FN (RINT) ...@@ -468,8 +468,7 @@ DEFINE_INT_AND_FLOAT_ROUND_FN (RINT)
(simplify (simplify
(mult:c @0 (convert? (lshift integer_onep@1 @2))) (mult:c @0 (convert? (lshift integer_onep@1 @2)))
(if (! FLOAT_TYPE_P (type) (if (! FLOAT_TYPE_P (type)
&& (element_precision (type) <= element_precision (TREE_TYPE (@1)) && tree_nop_conversion_p (type, TREE_TYPE (@1)))
|| TYPE_UNSIGNED (TREE_TYPE (@1))))
(lshift @0 @2))) (lshift @0 @2)))
/* Fold (C1/X)*C2 into (C1*C2)/X. */ /* Fold (C1/X)*C2 into (C1*C2)/X. */
......
2016-08-31 Marc Glisse <marc.glisse@inria.fr>
PR tree-optimization/73714
* gcc.dg/tree-ssa/pr73714.c: New test.
2016-08-31 Jerry DeLisle <jvdelisle@gcc.gnu.org> 2016-08-31 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR libgfortran/77393 PR libgfortran/77393
......
/* { dg-do compile { target lp64 } } */
/* { dg-options "-O2 -fdump-tree-optimized-raw" } */
int f(int a, int b){
return a * (int)(1L << b);
}
/* { dg-final { scan-tree-dump "mult_expr" "optimized" } } */
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