Commutative operands in longlong.h
tg at gmplib.org
Tue Jan 20 22:21:24 UTC 2015
Brett Hale <brettyhale at gmail.com> writes:
I notice many of the umul_ppmm implementations in longlong.h do not use the
commutative constraint for inputs, e.g.,
*"%r" (m0), "r" (m1)*
Is there a reason for this? It would seem to deny the compiler better
register scheduling opportunities. e.g., ARM / AArch64.
It is written like that when the constraints for the two commutative
operands are the same. Gcc will then never need to swap them.
(If you find a case where % is missing and the constraints are the same,
please let us know.)
Please encrypt, key id 0xC8601622
More information about the gmp-bugs