[Bug target/82339] Inefficient movabs instruction
amonakov at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Wed Sep 27 13:24:00 GMT 2017
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82339
Alexander Monakov <amonakov at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |amonakov at gcc dot gnu.org
--- Comment #3 from Alexander Monakov <amonakov at gcc dot gnu.org> ---
In addition to Agner Fog's manuals, the instlatx64 resource provide plenty of
latency/throughput data: http://users.atw.hu/instlatx64/
The benchmark in comment 0 measures throughput (including call/return overhead
which seems a bit strange), latency-wise movabs should be preferable.
So I think this indicates that a "real fix" should try to evaluate if a 64-bit
immediate move starts a critical-ish dependency chain, if yes, then we should
be trying to reduce latency and should prefer movabs, if not, we may prefer the
mov+shl combo that trades latency for overall throughput (i.e. assuming the
additional latency can be hidden by compiler scheduling and CPU reordering).
More information about the Gcc-bugs
mailing list