comparison gcc/testsuite/gcc.dg/tree-ssa/pr94718-1.c @ 152:2b5abeee2509

update gcc11
author anatofuz
date Mon, 25 May 2020 07:50:57 +0900
parents
children
comparison
equal deleted inserted replaced
145:1830386684a0 152:2b5abeee2509
1 /* PR tree-optimization/94718 */
2 /* { dg-do compile } */
3 /* { dg-options "-O2 -fno-ipa-icf -fdump-tree-optimized" } */
4 /* { dg-final { scan-tree-dump-times "= \[xy]_\[0-9]+\\\(D\\\) \\^ \[xy]_\[0-9]+\\\(D\\\);" 6 "optimized" } } */
5 /* { dg-final { scan-tree-dump-times "\[0-9]+ < 0;" 6 "optimized" } } */
6
7 #define I (-__INT_MAX__ - 1)
8
9 int
10 f1 (int x, int y)
11 {
12 return (x & I) != (y & I);
13 }
14
15 int
16 f2 (int x, int y)
17 {
18 return (~x & I) != (~y & I);
19 }
20
21 int
22 f3 (int x, int y)
23 {
24 return ((x & I) ^ I) != ((y & I) ^ I);
25 }
26
27 int
28 f4 (int x, int y)
29 {
30 int s = (x & I);
31 int t = (y & I);
32 return s != t;
33 }
34
35 int
36 f5 (int x, int y)
37 {
38 int s = (~x & I);
39 int t = (~y & I);
40 return s != t;
41 }
42
43 int
44 f6 (int x, int y)
45 {
46 int s = ((x & I) ^ I);
47 int t = ((y & I) ^ I);
48 return s != t;
49 }