Mercurial > hg > CbC > CbC_gcc
view gcc/testsuite/gcc.dg/20150120-1.c @ 138:fc828634a951
merge
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Thu, 08 Nov 2018 14:17:14 +0900 |
parents | 04ced10e8804 |
children |
line wrap: on
line source
/* { dg-do compile } */ /* { dg-options "-O2 -fdump-tree-original" } */ /* x + (x & 1) -> (x + 1) & ~1 */ int fn1 (int x) { return x + (x & 1); } int fn2 (int x) { return (x & 1) + x; } int fn3 (int x) { return x + (1 & x); } int fn4 (int x) { return (1 & x) + x; } unsigned int fn5 (unsigned int x) { return x + (x & 1); } unsigned int fn6 (unsigned int x) { return (x & 1) + x; } unsigned int fn7 (unsigned int x) { return x + (x % 2); } unsigned int fn8 (unsigned int x) { return (x % 2) + x; } unsigned int fn9 (unsigned int x) { return (1LL & x) + x; } /* { dg-final { scan-tree-dump-times "x \\+ 1" 9 "original" } } */