2018-04-30 Richard Biener <rguenther@suse.de>
[official-gcc.git] / gcc / testsuite / gcc.dg / tree-ssa / pr77664.c
blobe98945f00416ec33ae188b27e5b8c32ae20e6124
1 /* PR tree-optimization/77664 */
2 /* { dg-do compile } */
3 /* { dg-options "-O2 -fdump-tree-reassoc1-details" } */
5 extern void foo (void);
7 /* { dg-final { scan-tree-dump-times "Optimizing range test \[^\n\r]* and comparison" 6 "reassoc1" } } */
9 __attribute__((noinline, noclone)) void
10 fn1 (long long int a, unsigned short b, int c)
12 if (a >= 0 && c && a < b)
13 foo ();
16 __attribute__((noinline, noclone)) void
17 fn2 (long long int a, unsigned short b, int c)
19 if (a < 0 || c || a >= b)
20 foo ();
23 __attribute__((noinline, noclone)) void
24 fn3 (long long int a, unsigned short b)
26 if (a < 0 || b < a)
27 foo ();
30 __attribute__((noinline, noclone)) void
31 fn4 (long long int a, unsigned short b)
33 if (a <= b && a >= 0)
34 foo ();
37 __attribute__((noinline, noclone)) void
38 fn5 (long long int a, unsigned short b)
40 if (a < 0 | a > b)
41 foo ();
44 __attribute__((noinline, noclone)) void
45 fn6 (long long int a, unsigned short b)
47 if (b >= a & a >= 0)
48 foo ();