[Issue 21041] core.bitop.byteswap(ushort) should used ROL/ROR instead of XCHG

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sun Jul 12 13:32:02 UTC 2020


https://issues.dlang.org/show_bug.cgi?id=21041

--- Comment #3 from safety0ff.bugz <safety0ff.bugz at gmail.com> ---
(In reply to Bruce Carneal from comment #1)
> Current dmd -O emits 7 instructions to accomplish the rolw in the code body.

D converts many operations on narrow types to int, which DMD's backend then
fails to optimize away when it is possible/advantageous.

--


More information about the Digitalmars-d-bugs mailing list