diff options
author | Richard Biener <rguenther@suse.de> | 2015-07-01 08:37:19 +0000 |
---|---|---|
committer | Richard Biener <rguenther@suse.de> | 2015-07-01 08:37:19 +0000 |
commit | d9ab4649161bc60fc68c9bb36d54b28142a3797a (patch) | |
tree | e4a5056a7da5f93f5dbacd47b6f22b61fdf92aad /gcc/testsuite/gcc.dg/fold-ior-2.c | |
parent | e79886b1b133e4fd15f1c5c16d3e5a28c1233c33 (diff) | |
parent | 00b24710e5527e8b51904824c6e2a7717455c233 (diff) |
2015-07-01 Richard Biener <rguenther@suse.de>match-and-simplify
Merge from trunk r225116 through r225225.
* match-bitwise.pd: Removed and merged remains into
match.pd.
git-svn-id: https://gcc.gnu.org/svn/gcc/branches/match-and-simplify@225229 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/gcc.dg/fold-ior-2.c')
-rw-r--r-- | gcc/testsuite/gcc.dg/fold-ior-2.c | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/fold-ior-2.c b/gcc/testsuite/gcc.dg/fold-ior-2.c new file mode 100644 index 00000000000..41b372d06fa --- /dev/null +++ b/gcc/testsuite/gcc.dg/fold-ior-2.c @@ -0,0 +1,47 @@ +/* { dg-do compile } */ +/* { dg-options "-O -fdump-tree-cddce1" } */ + +int +fn1 (int x) +{ + return ~x | x; +} + +int +fn2 (int x) +{ + return x | ~x; +} + +unsigned int +fn3 (unsigned int x) +{ + return ~x | x; +} + +unsigned int +fn4 (unsigned int x) +{ + return x | ~x; +} + +int +fn5 (int x) +{ + return ~x | (unsigned) x; +} + +int +fn6 (int x) +{ + return (unsigned) ~x | x; +} + +int +fn7 (int x) +{ + return ~(unsigned) x | x; +} + +/* { dg-final { scan-tree-dump-not "~" "cddce1" } } */ +/* { dg-final { scan-tree-dump-not " \\| " "cddce1" } } */ |