PR tree-optimization/31261
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 30 Sep 2010 19:21:34 +0000 (19:21 +0000)
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 30 Sep 2010 19:21:34 +0000 (19:21 +0000)
commit50194c948e64c8f34a3c1808e32af0e9ef918e34
treeb8f4be9858411bbb0b971675fd0bd1a833a0e271
parent445b7c96edf27f8a16adf5f9ef86cca29b1c7a59
PR tree-optimization/31261
* fold-const.c (fold_binary): Optimize ((A & N) + B) & M
for constants M and N, M == (1LL << cst) - 1 && (N & M) == M.

* gcc.dg/tree-ssa/pr31261.c: New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@164761 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ChangeLog
gcc/fold-const.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/tree-ssa/pr31261.c [new file with mode: 0644]