1 /* { dg-do run { target { bmi2 && { ! ia32 } } } } */
2 /* { dg-options "-mbmi2 -O2" } */
4 #include "bmi2-check.h"
6 __attribute__((noinline
))
8 calc_mul_u64 (unsigned long long volatile a
, unsigned long long b
)
10 unsigned __int128 res
= 0;
12 for (i
= 0; i
< b
; ++i
)
13 res
+= (unsigned __int128
) a
;
22 unsigned long long a
= 0xce7ace0ce7ace0;
23 unsigned long long b
= 0xface;
24 unsigned __int128 res
, res_ref
;
30 res_ref
= calc_mul_u64 (a
, b
);
31 res
= (unsigned __int128
) a
* b
;