Debian Codegraph @

gcc/testsuite/gcc.target/powerpc/pr101129.c

raw
1 /* { dg-do run } */
2 /* { dg-require-effective-target p8vector_hw } */
3 /* { dg-require-effective-target int128 } */
4 /* { dg-options "-mdejagnu-cpu=power8 -O " } */
5
6 /* PR101129: The swaps pass was turning a mult-lopart into a mult-hipart.
7 Make sure we aren't doing that anymore. */
8
9 typedef unsigned char u8;
10 typedef unsigned char __attribute__((__vector_size__ (8))) U;
11 typedef unsigned char __attribute__((__vector_size__ (16))) V;
12 typedef unsigned int u32;
13 typedef unsigned long long u64;
14 typedef __int128 u128;
15
16 u8 g;
17 U u;
18
19 void
20 foo0 (u32 u32_0, U *ret)
21 {
22 u128 u128_2 = u32_0 * (u128)((V){ 5 } > (u32_0 & 4));
23 u64 u64_r = u128_2 >> 64;
24 u8 u8_r = u64_r + g;
25 *ret = u + u8_r;
26 }
27
28 int
29 main (void)
30 {
31 U x;
32 foo0 (7, &x);
33 for (unsigned i = 0; i < sizeof (x); i++)
34 if (x[i] != 0) __builtin_abort();
35 return 0;
36 }