diff options
author | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-07-12 22:11:27 +0000 |
---|---|---|
committer | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-07-12 22:11:27 +0000 |
commit | 273e780e59817ad6ee61abfb851d35e11c044c13 (patch) | |
tree | 2ea05cb45ffae6bb753a132c2144022300e03f44 /gcc/testsuite/gcc.dg/tree-ssa/vrp53.c | |
parent | 0c5c4d5992e57440e4542c72b95bd1f02176193d (diff) | |
download | gcc-273e780e59817ad6ee61abfb851d35e11c044c13.tar.gz |
* tree-vrp.c (simplify_bit_ops_using_ranges): New function.
(simplify_stmt_using_ranges): Use it.
* gcc.dg/tree-ssa/vrp53.c: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@162115 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/gcc.dg/tree-ssa/vrp53.c')
-rw-r--r-- | gcc/testsuite/gcc.dg/tree-ssa/vrp53.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/vrp53.c b/gcc/testsuite/gcc.dg/tree-ssa/vrp53.c new file mode 100644 index 00000000000..66bbfb67b90 --- /dev/null +++ b/gcc/testsuite/gcc.dg/tree-ssa/vrp53.c @@ -0,0 +1,24 @@ +/* { dg-do compile } */ +/* { dg-options "-O2 -fdump-tree-vrp1" } */ + +int +f1 (int x) +{ + x &= 0xff; + x += 0x400; + x &= 0x7ff; + return x; +} + +int +f2 (int x) +{ + x &= 0xff; + x += 0x5400; + x |= 0x4400; + return x; +} + +/* { dg-final { scan-tree-dump-not "\& (2047|0x7ff)" "vrp1" } } */ +/* { dg-final { scan-tree-dump-not "\\| (17408|0x4400)" "vrp1" } } */ +/* { dg-final { cleanup-tree-dump "vrp1" } } */ |