https://issues.dlang.org/show_bug.cgi?id=21041
--- Comment #5 from Bruce Carneal <[email protected]> --- (In reply to safety0ff.bugz from comment #3) > (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. Yes. DMDs back end is quick, but the code it generates is not state-of-the-art. That said, optimizing the DMD code gen for code.bitop rotations seems more useful than a ushort byteswap improvement. The latter could be implemented as an "inline" of the former. Recognizing the rotation patterns generally, ala LLVM, would be even better but quite a bit of work I'd imagine. Probably not worth it given current resource constraints (Walter's time). Lots of big front-end fish to fry. --
