This is the mail archive of the gcc-cvs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

r242203 - /branches/ARM/sve-branch/gcc/match.pd


Author: rsandifo
Date: Fri Nov 11 17:18:08 2016
New Revision: 242203

URL: https://gcc.gnu.org/viewcvs?rev=242203&root=gcc&view=rev
Log:
Fix for match.pd handling of three-constant bitops

natch.pd tries to reassociate two bit operations if both
of them have constant operands.  However, with the polynomial
integers added later, there's no guarantee that a bit operation
on two integers can be folded at compile time.  This means that
the pattern can trigger for operations on three constants,
and as things stood could endlessly oscillate between the
two associations.

This patch keeps the existing pattern for the normal case
of a non-constant first operand.  When all three operands
are constant it tries to find a pair of constants that do fold.
If none do, it keeps the original expression as-was.

Modified:
    branches/ARM/sve-branch/gcc/match.pd


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]