diff options
author | phython <phython@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-06-13 00:18:41 +0000 |
---|---|---|
committer | phython <phython@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-06-13 00:18:41 +0000 |
commit | 0e7e788d13bdd47d224b06a29e343f41b43b4d15 (patch) | |
tree | 0e491ce1198062f770844aa5c3a1dadc4b298c0c /gcc/testsuite/gcc.dg/pr14796-1.c | |
parent | 297208995515baecbd9a87516c2be0e3d35313df (diff) | |
download | gcc-0e7e788d13bdd47d224b06a29e343f41b43b4d15.tar.gz |
2005-06-12 James A. Morrison <phython@gcc.gnu.org>
PR tree-optimization/14796
* fold-const (fold_binary): Transform (X << C) >> C into X & (-1>>C)
for unsigned types.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@100869 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/gcc.dg/pr14796-1.c')
-rw-r--r-- | gcc/testsuite/gcc.dg/pr14796-1.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/pr14796-1.c b/gcc/testsuite/gcc.dg/pr14796-1.c index c927e2b5403..7ddc4fe3467 100644 --- a/gcc/testsuite/gcc.dg/pr14796-1.c +++ b/gcc/testsuite/gcc.dg/pr14796-1.c @@ -9,6 +9,16 @@ int g (int b) { return (b >> 5) << 5; } +unsigned long long h (unsigned long long c) { + return (c << 60) >> 60; +} + +int l (int d) { + return (d << 6) >> 6; +} + /* { dg-final { scan-tree-dump "a << 9" "gimple" } } */ /* { dg-final { scan-tree-dump "b & -32" "gimple" } } */ +/* { dg-final { scan-tree-dump "c & 15" "gimple" } } */ +/* { dg-final { scan-tree-dump "d << 6" "gimple" } } */ /* { dg-final { cleanup-tree-dump "gimple" } } */ |