Debian Codegraph @

gcc/testsuite/gcc.target/i386/bmi2-pr112526.c

raw
1 /* PR target/112526 */
2 /* { dg-do run { target { bmi2 && int128 } } } */
3 /* { dg-options "-O2 -mbmi2" } */
4
5 #include "bmi2-check.h"
6
7 __attribute__((noipa)) void
8 foo (unsigned long long x, unsigned __int128 *y, unsigned long long z,
9 unsigned long long *w)
10 {
11 register unsigned long long a __asm ("%r10") = x + z;
12 register unsigned __int128 b __asm ("%r8") = ((unsigned __int128) a) * 257342423UL;
13 asm volatile ("" : "+r" (b));
14 asm volatile ("" : "+d" (a));
15 *y = b;
16 *w = a;
17 }
18
19 static void
20 bmi2_test ()
21 {
22 unsigned __int128 y;
23 unsigned long long w;
24 foo (10268318293806702989UL, &y, 4702524958196331333UL, &w);
25 if (y != ((((unsigned __int128) 0xc72d2c9UL) << 64) | 0x9586adfdc95b225eUL)
26 || w != 14970843252003034322UL)
27 abort ();
28 }