diff options
author | Jakub Jelinek <jakub@redhat.com> | 2007-12-03 23:38:28 +0100 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2007-12-03 23:38:28 +0100 |
commit | 22164c3db7653556de1044be9491034c1c40bf8e (patch) | |
tree | be824c8293ea6a41f93ef21d3fef35ab8fdd8e00 /gcc/config | |
parent | 36ad7922cbf93f3601ab81b6b4d332fddf575a9f (diff) | |
download | gcc-22164c3db7653556de1044be9491034c1c40bf8e.zip gcc-22164c3db7653556de1044be9491034c1c40bf8e.tar.gz gcc-22164c3db7653556de1044be9491034c1c40bf8e.tar.bz2 |
re PR middle-end/29749 (Missing byte swap optimizations)
PR middle-end/29749
* fold-const.c (fold_binary) <case BIT_AND_EXPR>: Optimize
(X << C1) & C2 into (X << C1) & (C2 | ((1 << C1) - 1))
and (X >> C1) & C2 into (X >> C1) & (C2 | ~((type) -1 >> C1)).
(fold_binary) <case LSHIFT_EXPR, case RSHIFT_EXPR>: Optimize
(X & C2) << C1 into (X << C1) & (C2 << C1) and
(X & C2) >> C1 into (X >> C1) & (C2 >> C1) if that allows further
optimizations.
* gcc.dg/fold-rotate-1.c: New test.
From-SVN: r130589
Diffstat (limited to 'gcc/config')
0 files changed, 0 insertions, 0 deletions