1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
|
/* { dg-do compile } */
/* { dg-options "-O2 -fdump-tree-dse1 -Wno-psabi" } */
typedef int v4si __attribute__((vector_size(16)));
/* Generic */
__attribute__((noipa)) int
t1 (int a, int b)
{
return (~a | b) ^ a;
}
__attribute__((noipa)) unsigned int
t2 (int a, int b)
{
return a ^ (~a | (unsigned int) b);
}
__attribute__((noipa)) signed char
t3 (signed char a, signed char b)
{
return (b | ~a) ^ a;
}
__attribute__((noipa)) unsigned char
t4 (signed char a, signed char b)
{
return ((unsigned char) a) ^ (b | ~a);
}
__attribute__((noipa)) short
t5 (short a, short b)
{
return a ^ (b | ~a);
}
__attribute__((noipa)) unsigned short
t6 (short a, short b)
{
return ((unsigned short) a) ^ (b | ~a);
}
__attribute__((noipa)) long
t7 (long a, long b)
{
return a ^ (b | ~a);
}
__attribute__((noipa)) unsigned long
t8 (long a, long b)
{
return ((unsigned long) a) ^ (b | ~a);
}
__attribute__((noipa)) long long
t9 (long long a, long long b)
{
return a ^ (b | ~a);
}
__attribute__((noipa)) unsigned long long
t10 (long long a, long long b)
{
return ((unsigned long long) a) ^ (b | ~a);
}
__attribute__((noipa)) v4si
t21 (v4si a, v4si b)
{
return a ^ (b | ~a);
}
/* Gimple */
__attribute__((noipa)) int
t11 (int a, int b)
{
int t1 = ~a;
int t2 = t1 | b;
int t3 = t2 ^ a;
return t3;
}
__attribute__((noipa)) unsigned int
t12 (int a, unsigned int b)
{
int t1 = ~a;
unsigned int t2 = t1 | b;
unsigned int t3 = a ^ t2;
return t3;
}
__attribute__((noipa)) signed char
t13 (signed char a, signed char b)
{
signed char t1 = ~a;
signed char t2 = b | t1;
signed char t3 = t2 ^ a;
return t3;
}
__attribute__((noipa)) unsigned char
t14 (unsigned char a, signed char b)
{
unsigned char t1 = ~a;
signed char t2 = b | t1;
unsigned char t3 = a ^ t2;
return t3;
}
__attribute__((noipa)) short
t15 (short a, short b)
{
short t1 = ~a;
short t2 = t1 | b;
short t3 = t2 ^ a;
return t3;
}
__attribute__((noipa)) unsigned short
t16 (unsigned short a, short b)
{
short t1 = ~a;
short t2 = t1 | b;
unsigned short t3 = t2 ^ a;
return t3;
}
__attribute__((noipa)) long
t17 (long a, long b)
{
long t1 = ~a;
long t2 = t1 | b;
long t3 = t2 ^ a;
return t3;
}
__attribute__((noipa)) unsigned long
t18 (long a, unsigned long b)
{
long t1 = ~a;
unsigned long t2 = t1 | b;
unsigned long t3 = t2 ^ a;
return t3;
}
__attribute__((noipa)) long long
t19 (long long a, long long b)
{
long long t1 = ~a;
long long t2 = t1 | b;
long long t3 = t2 ^ a;
return t3;
}
__attribute__((noipa)) unsigned long long
t20 (long long a, long long b)
{
long long t1 = ~a;
long long t2 = t1 | b;
unsigned long long t3 = a ^ t2;
return t3;
}
__attribute__((noipa)) v4si
t22 (v4si a, v4si b)
{
v4si t1 = ~a;
v4si t2 = t1 | b;
v4si t3 = a ^ t2;
return t3;
}
/* { dg-final { scan-tree-dump-not " \\\| " "dse1" } } */
/* { dg-final { scan-tree-dump-not " \\\^ " "dse1" } } */
/* { dg-final { scan-tree-dump-times " ~" 22 "dse1" } } */
/* { dg-final { scan-tree-dump-times " & " 22 "dse1" } } */
|