diff options
author | Kai Tietz <ktietz@redhat.com> | 2011-06-20 13:49:27 +0200 |
---|---|---|
committer | Kai Tietz <ktietz@gcc.gnu.org> | 2011-06-20 13:49:27 +0200 |
commit | a95015b6cd1d68d540e1805686d534e88ec6bfbd (patch) | |
tree | dd4bcae7ea7637ba444dd69516cc7a1ce4f2d852 /gcc/testsuite/gcc.dg/binop-notand2.c | |
parent | 6f17ef336c92537292114eb6675360f264575099 (diff) | |
download | gcc-a95015b6cd1d68d540e1805686d534e88ec6bfbd.zip gcc-a95015b6cd1d68d540e1805686d534e88ec6bfbd.tar.gz gcc-a95015b6cd1d68d540e1805686d534e88ec6bfbd.tar.bz2 |
ChangeLog gcc/
2011-06-20 Kai Tietz <ktietz@redhat.com>
* fold-const.c (fold_binary_loc): Add missing
folding for truth-not operations in combination
with binary and.
ChangeLog gcc/testsuite/
2011-06-20 Kai Tietz <ktietz@redhat.com>
* gcc.dg/binop-notand1.c: New test.
* gcc.dg/binop-notand2.c: New test.
* gcc.dg/binop-notand3.c: New test.
* gcc.dg/binop-notand4.c: New test.
* gcc.dg/binop-notand5.c: New test.
* gcc.dg/binop-notand6.c: New test.
From-SVN: r175206
Diffstat (limited to 'gcc/testsuite/gcc.dg/binop-notand2.c')
-rw-r--r-- | gcc/testsuite/gcc.dg/binop-notand2.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/binop-notand2.c b/gcc/testsuite/gcc.dg/binop-notand2.c new file mode 100644 index 0000000..0076d4b --- /dev/null +++ b/gcc/testsuite/gcc.dg/binop-notand2.c @@ -0,0 +1,11 @@ +/* { dg-do compile } */ +/* { dg-options "-O2 -fdump-tree-optimized" } */ + +int +foo (int a) +{ + return (!a & 1) != (a == 0); +} + +/* { dg-final { scan-tree-dump-times "return 0" 1 "optimized" } } */ +/* { dg-final { cleanup-tree-dump "optimized" } } */ |