[PATCH] D24311: Implement MS _rot intrinsics

David Majnemer via cfe-commits cfe-commits at lists.llvm.org
Wed Sep 7 19:11:14 PDT 2016

majnemer added a subscriber: majnemer.
majnemer added a comment.

In https://reviews.llvm.org/D24311#536545, @agutowski wrote:

> In https://reviews.llvm.org/D24311#536333, @rnk wrote:
> > You should locally verify that this generates the correct assembly when optimizations are enabled, and if it doesn't, try to make the input look more like llvm/test/CodeGen/X86/rotate.ll
> Yeah, I checked that it's optimized to ROL/ROR instruction - now, after looking closer, I can see that it's optimized for all functions except for the ones operating on 16-bit integers. Could that be a calculated decision, or should I try to make it generate ROL/ROR whenever it can?
> Edit: I tried to make the code as similar to the one from rotate.ll as possible, and it's still not optimized to ROL/ROR for 16-bit integers, so I guess it should stay that way.

I wouldn't worry about this too much...  It is up to the backend to do the right thing.


More information about the cfe-commits mailing list