[PATCH] D49606: [ms] Add __shiftleft128 / __shiftright128 intrinsics

Sanjay Patel via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Jul 20 14:06:06 PDT 2018


spatel added a comment.

In https://reviews.llvm.org/D49606#1170448, @thakis wrote:

> Isn't implementing this in plain old C the nicest approach anyhow, even once funnel shift exists?


No, the primary reason for creating the intrinsic is that we can’t guarantee that we’ll recognize the pattern as ‘shld’ or ‘rotate’ in this C/IR form. That’s because the pattern can get split across basic blocks, so the backend can’t easily recognize it. Also, IIUC this patch only deals with the specific case of 64-bit values, so we still don’t have the functionality for other widths?

I don’t object if this helps that one case, but we have made the investment in the IR intrinsics, so using them should be the general direction/goal.


https://reviews.llvm.org/D49606





More information about the cfe-commits mailing list