Fold ctz(-x) and ctz(abs(x)) as ctz(x) in match.pd.
[official-gcc.git] / gcc / testsuite / gcc.dg / tree-ssa / pr20318.c
blob80fd72668715909ce45f57553db5e9601ce1adf7
1 /* { dg-do compile { target { ! keeps_null_pointer_checks } } } */
2 /* { dg-options "-O2 -fdump-tree-original -fdump-tree-vrp1 -fdelete-null-pointer-checks -fdisable-tree-evrp" } */
4 extern int* f(int) __attribute__((returns_nonnull));
5 extern void eliminate ();
6 void g () {
7 if (f (2) == 0)
8 eliminate ();
10 void h () {
11 int *p = f (2);
12 if (p == 0)
13 eliminate ();
16 /* { dg-final { scan-tree-dump-times "== 0" 1 "original" } } */
17 /* { dg-final { scan-tree-dump-times "Folding predicate\[^\\n\]*to 0" 1 "vrp1" } } */