Debian Codegraph @

gcc/testsuite/gcc.target/i386/sse2-v1ti-shift-2.c

raw
1 /* PR target/102986 */
2 /* { dg-do compile { target int128 } } */
3 /* { dg-options "-O2 -msse2" } */
4
5 typedef unsigned __int128 uv1ti __attribute__ ((__vector_size__ (16)));
6 typedef __int128 sv1ti __attribute__ ((__vector_size__ (16)));
7
8 uv1ti ashl(uv1ti x, unsigned int i) { return x << i; }
9 uv1ti lshr(uv1ti x, unsigned int i) { return x >> i; }
10 sv1ti ashr(sv1ti x, unsigned int i) { return x >> i; }
11 uv1ti rotr(uv1ti x, unsigned int i) { return (x >> i) | (x << (128-i)); }
12 uv1ti rotl(uv1ti x, unsigned int i) { return (x << i) | (x >> (128-i)); }
13