Remove old autovect-branch by moving to "dead" directory.
[official-gcc.git] / old-autovect-branch / gcc / testsuite / gcc.dg / fold-mod-1.c
blob4a26d0fc088458a4238b54f45a3258f592b93126
1 /* { dg-do compile } */
2 /* { dg-options "-fdump-tree-gimple" } */
4 #define ABS(x) (x > 0 ? x : -x)
6 unsigned int f (unsigned int a) {
7 /* (unsigned)-8 is not a power of 2. */
8 return a % -8;
11 int g (int b) {
12 return ABS (b) % -8;
15 int h (int c) {
16 return ABS (c) % 8;
19 unsigned int k (unsigned int d) {
20 return d % 8;
23 /* { dg-final { scan-tree-dump "a % (4294967288|0fffffff8)" "gimple" } } */
24 /* { dg-final { scan-tree-dump-times " & 7" 3 "gimple" } } */
25 /* { dg-final { cleanup-tree-dump "gimple" } } */