URL
https://opencores.org/ocsvn/openrisc/openrisc/trunk
Subversion Repositories openrisc
[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.c-torture/] [execute/] [vector-compare-2.c] - Rev 849
Go to most recent revision | Compare with Previous | Blame | View Log
#define vector(elcount, type) \ __attribute__((vector_size((elcount)*sizeof(type)))) type /* Check that constant folding in these simple cases works. */ vector (4, int) foo (vector (4, int) x) { return (x == x) + (x != x) + (x > x) + (x < x) + (x >= x) + (x <= x); } int main (int argc, char *argv[]) { vector (4, int) t = {argc, 2, argc, 42}; vector (4, int) r; int i; r = foo (t); for (i = 0; i < 4; i++) if (r[i] != -3) __builtin_abort (); return 0; }
Go to most recent revision | Compare with Previous | Blame | View Log