1 /* { dg-do compile } */
2 /* { dg-options "-O2 -fdump-tree-dse2 -Wno-psabi" } */
4 typedef int v4si
__attribute__((vector_size(4 * sizeof(int))));
7 __attribute__((noipa
)) int
8 t1 (int a
, int b
, int c
)
10 return ((a
^ c
) & b
) | a
;
13 __attribute__((noipa
)) unsigned int
14 t2 (int a
, unsigned int b
, int c
)
16 return ((a
^ c
) & b
) | a
;
19 __attribute__((noipa
)) unsigned long
20 t3 (unsigned long a
, long b
, unsigned long c
)
22 return ((a
^ c
) & b
) | a
;
25 __attribute__((noipa
)) unsigned short
26 t4 (short a
, unsigned short b
, unsigned short c
)
28 return (unsigned short) ((a
^ c
) & b
) | a
;
31 __attribute__((noipa
)) unsigned char
32 t5 (unsigned char a
, signed char b
, signed char c
)
34 return ((a
^ c
) & b
) | a
;
37 __attribute__((noipa
)) long long
38 t6 (long long a
, long long b
, long long c
)
40 return ((a
^ c
) & (unsigned long long) b
) | a
;
44 __attribute__((noipa
)) int
45 t7 (int a
, int b
, int c
)
53 __attribute__((noipa
)) int
54 t8 (int a
, unsigned int b
, unsigned int c
)
56 unsigned int t1
= a
^ c
;
62 __attribute__((noipa
)) unsigned int
63 t9 (unsigned int a
, unsigned int b
, int c
)
65 unsigned int t1
= a
^ c
;
66 unsigned int t2
= t1
& b
;
67 unsigned int t3
= t2
| a
;
71 __attribute__((noipa
)) unsigned long
72 t10 (unsigned long a
, long b
, unsigned long c
)
74 unsigned long t1
= a
^ c
;
75 unsigned long t2
= t1
& b
;
76 unsigned long t3
= t2
| a
;
80 __attribute__((noipa
)) unsigned short
81 t11 (short a
, unsigned short b
, short c
)
84 unsigned short t2
= t1
& b
;
85 unsigned short t3
= t2
| a
;
89 __attribute__((noipa
)) unsigned char
90 t12 (signed char a
, unsigned char b
, signed char c
)
92 unsigned char t1
= a
^ c
;
93 unsigned char t2
= t1
& b
;
94 unsigned char t3
= t2
| a
;
98 __attribute__((noipa
)) unsigned long long
99 t13 (unsigned long long a
, long long b
, unsigned long long c
)
101 long long t1
= a
^ c
;
102 long long t2
= t1
& b
;
103 unsigned long long t3
= t2
| a
;
108 __attribute__((noipa
)) v4si
109 t14 (v4si a
, v4si b
, v4si c
)
111 return ((a
^ c
) & b
) | a
;
114 __attribute__((noipa
)) v4si
115 t15 (v4si a
, v4si b
, v4si c
)
123 /* { dg-final { scan-tree-dump-not " \\\^ " "dse2" } } */
124 /* { dg-final { scan-tree-dump-times " \\\| " 15 "dse2" } } */
125 /* { dg-final { scan-tree-dump-times " & " 15 "dse2" } } */