arm: fix typo in dg-require-effective-target [PR118089]
[official-gcc.git] / gcc / testsuite / gcc.dg / tree-ssa / phi-opt-36.c
blob4baf9f82a22f79eb8dd4369b99fdfe67e408affc
1 /* { dg-options "-O2 -fdump-tree-phiopt" } */
3 unsigned f0(int A)
5 unsigned t = A;
6 // A == 0? A : -A same as -A
7 if (A == 0) return t;
8 return -t;
11 unsigned f1(int A)
13 unsigned t = A;
14 // A != 0? A : -A same as A
15 if (A != 0) return t;
16 return -t;
18 unsigned f2(int A)
20 unsigned t = A;
21 // A >= 0? A : -A same as abs (A)
22 if (A >= 0) return t;
23 return -t;
25 unsigned f3(int A)
27 unsigned t = A;
28 // A > 0? A : -A same as abs (A)
29 if (A > 0) return t;
30 return -t;
32 unsigned f4(int A)
34 unsigned t = A;
35 // A <= 0? A : -A same as -abs (A)
36 if (A <= 0) return t;
37 return -t;
39 unsigned f5(int A)
41 unsigned t = A;
42 // A < 0? A : -A same as -abs (A)
43 if (A < 0) return t;
44 return -t;
47 /* f4 and f5 are not allowed to be optimized in early phi-opt. */
48 /* { dg-final { scan-tree-dump-times "if " 2 "phiopt1" } } */
49 /* { dg-final { scan-tree-dump-not "if " "phiopt2" } } */