[Bug tree-optimization/110009] Another missing ABS detection
pinskia at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Mon Sep 4 09:00:24 GMT 2023
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110009
--- Comment #6 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Vector testcases too:
```
#define vector __attribute__((vector_size(4*sizeof(int))))
vector int
signed_f1(vector int v)
{
vector int b_5;
vector int _7;
vector int _9;
b_5 = v>>(sizeof(int)*8 - 1);
_9 = b_5 | 1;
_7 = v * _9;
return _7;
}
vector unsigned
unsigned_f1 (vector int v)
{
vector unsigned int d_6;
vector int b_5;
vector unsigned int v1_2;
vector unsigned int _7;
vector int _9;
b_5 = v>>(sizeof(int)*8 - 1);
_9 = b_5 | 1;
d_6 = (vector unsigned int) _9;
v1_2 = (vector unsigned int) v;
_7 = v1_2 * d_6;
return _7;
}
```
Which does work with the match pattern in comment #5.
More information about the Gcc-bugs
mailing list