https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119280
--- Comment #4 from Huaqi <fanghuaqi at vip dot qq.com> ---
(In reply to Andrew Pinski from comment #2)
>     res = a[0] * a[0];
>     __asm volatile("rdcycle %0" : "=r"(end_cycle) : "r"(res) : "memory");
> 
> Will cause the second rdcycle to stay after the mult.
> 
> Otherwise you could just write the full thing in assembly.
> 
> Anways this documented and has been for all long time

That will be strange, since the read cycle could be macros used everywhere, so
I didn't know where to add the `res` part, since the code I want to bench, it
could be anything, not just this simple case

Reply via email to