PR target/80969 - Fix ICE with -mabi=ms -mavx512f, reduce wasted space when realignin...
[official-gcc.git] / gcc / testsuite / gcc.target / i386 / pr33552.c
blob68a81222eead0f29c810c13c697777ef87ca9741
1 /* PR rtl-optimization/33552 */
2 /* { dg-do run } */
3 /* { dg-options "-O2" } */
5 extern void abort (void);
7 void
8 __attribute__((noinline))
9 foo (unsigned long *wp, unsigned long *up, long un, unsigned long *vp)
11 long j;
12 unsigned long prod_low, prod_high;
13 unsigned long cy_dig;
14 unsigned long v_limb;
15 v_limb = vp[0];
16 cy_dig = 64;
17 for (j = un; j > 0; j--)
19 unsigned long u_limb, w_limb;
20 u_limb = *up++;
21 __asm__ (""
22 : "=r" (prod_low), "=r" (prod_high)
23 : "0" (u_limb), "1" (v_limb));
24 __asm__ ("mov %5, %1; add %5, %0"
25 : "=r" (cy_dig), "=&r" (w_limb)
26 : "0" (prod_high), "rm" (0), "1" (prod_low), "rm" (cy_dig));
27 *wp++ = w_limb;
31 int
32 main (void)
34 unsigned long wp[4];
35 unsigned long up[4] = { 0x1248, 0x248a, 0x1745, 0x1853 };
36 unsigned long vp = 0xdead;
37 foo (wp, up, 4, &vp);
38 if (wp[0] != 0x40 || wp[1] != 0xdeed || wp[2] != 0x1bd9a || wp[3] != 0x29c47)
39 abort ();
40 return 0;