]> git.ipfire.org Git - thirdparty/gcc.git/commit
re PR tree-optimization/15310 ([tree-ssa] Optimize an addition in a bit field)
authorJakub Jelinek <jakub@redhat.com>
Wed, 30 Jun 2004 10:09:55 +0000 (12:09 +0200)
committerJakub Jelinek <jakub@gcc.gnu.org>
Wed, 30 Jun 2004 10:09:55 +0000 (12:09 +0200)
commitdf62f18ae1401944493ecccd47f7b0714d0ab8f8
treede710deee48e0626b77470a406d37539f06fe50a
parente6a0022b28265f3676f7273a05afb4f6d1d7fd14
re PR tree-optimization/15310 ([tree-ssa] Optimize an addition in a bit field)

* simplify-rtx.c (simplify_binary_operation): Simplify
((A & N) + B) & M -> (A + B) & M if M is pow2 minus 1 constant and
N has at least all bits in M set as well.

PR tree-optimization/15310
* expr.c (expand_assignment): Optimize += or -= on a bit field in
most significant bits.

* gcc.c-torture/execute/20040629-1.c: New test.

From-SVN: r83900
gcc/ChangeLog
gcc/expr.c
gcc/simplify-rtx.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.c-torture/execute/20040629-1.c [new file with mode: 0644]