| 1 |
/* { dg-do compile } */ |
| 2 |
/* { dg-options "-O2 -fdump-tree-optimized -Wno-psabi" } */ |
| 3 |
|
| 4 |
#include <limits.h> |
| 5 |
|
| 6 |
#define vector __attribute__((vector_size(sizeof(unsigned)*2))) |
| 7 |
|
| 8 |
vector unsigned or1(vector unsigned x, vector unsigned y) |
| 9 |
{ |
| 10 |
/* (x <= y) | (x != 0)) --> true */ |
| 11 |
return (x <= y) | (x != 0); |
| 12 |
} |
| 13 |
|
| 14 |
vector unsigned or2(vector unsigned x, vector unsigned y) |
| 15 |
{ |
| 16 |
/* (x >= y) | (x != UINT_MAX) --> true */ |
| 17 |
return (x >= y) | (x != UINT_MAX); |
| 18 |
} |
| 19 |
|
| 20 |
vector signed or3(vector signed x, vector signed y) |
| 21 |
{ |
| 22 |
/* (x <= y) | (x != INT_MIN) --> true */ |
| 23 |
return (x <= y) | (x != INT_MIN); |
| 24 |
} |
| 25 |
|
| 26 |
vector signed or4(vector signed x, vector signed y) |
| 27 |
{ |
| 28 |
/* (x >= y) | (x != INT_MAX) --> true */ |
| 29 |
return (x >= y) | (x != INT_MAX); |
| 30 |
} |
| 31 |
|
| 32 |
/* { dg-final { scan-tree-dump-not " != " "optimized" } } */ |
| 33 |
/* { dg-final { scan-tree-dump-not " <= " "optimized" } } */ |
| 34 |
/* { dg-final { scan-tree-dump-not " >= " "optimized" } } */ |