r262485 - in /trunk/gcc: ChangeLog fold-const.c...
jakub@gcc.gnu.org
jakub@gcc.gnu.org
Fri Jul 6 21:42:00 GMT 2018
Author: jakub
Date: Fri Jul 6 21:42:41 2018
New Revision: 262485
URL: https://gcc.gnu.org/viewcvs?rev=262485&root=gcc&view=rev
Log:
PR tree-optimization/86401
* fold-const.c (fold_binary_loc) <case BIT_AND_EXPR>: Move the
((A & N) + B) & M -> (A + B) & M etc. optimization into ...
(fold_bit_and_mask): ... here. New helper function for match.pd.
* fold-const.h (fold_bit_and_mask): Declare.
* match.pd (((A & N) + B) & M -> (A + B) & M): New optimization.
* gcc.dg/tree-ssa/pr86401-1.c: New test.
* gcc.dg/tree-ssa/pr86401-2.c: New test.
* c-c++-common/rotate-9.c: New test.
Added:
trunk/gcc/testsuite/c-c++-common/rotate-9.c
trunk/gcc/testsuite/gcc.dg/tree-ssa/pr86401-1.c
trunk/gcc/testsuite/gcc.dg/tree-ssa/pr86401-2.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/fold-const.c
trunk/gcc/fold-const.h
trunk/gcc/match.pd
trunk/gcc/testsuite/ChangeLog
More information about the Gcc-cvs
mailing list