[PATCH] D48705: [CodeGenPrepare] Reverse LICM pass for shift and rotate patterns.

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 28 12:37:46 PDT 2018


spatel added a comment.

In https://reviews.llvm.org/D48705#1147074, @efriedma wrote:

> I'm not sure https://reviews.llvm.org/D46946 and https://reviews.llvm.org/D47019 are good ideas in the first place, particularly https://reviews.llvm.org/D47019.  Expanding an intrinsic to an 8-instruction sequence is getting past the point where we're actually getting any benefit from transforming intrinsic to native IR.  Emitting a complicated lowering like that, and trying to recover it in isel seems very tricky to get right, and as far as I can tell we don't get much benefit.
>
> If we are going to expand out x86 shift and rotate intrinsics, we should probably consider pattern-matching on IR, rather than waiting for SelectionDAG.  Trying to work around isel limitations in this fashion is fragile, and will probably have a wider effect than you want.
>
> For rotates, there was a proposal to add a generic IR intrinsic for variable rotates on llvmdev, due to the complications involved in late pattern-matching.


For reference, that was here:
http://lists.llvm.org/pipermail/llvm-dev/2018-May/123292.html

And the discussion stopped with no objections that I see, but there are some open questions about the semantics and form of any intrinsic. The proposal was made by Fabian Giessen. I don't find a Phab ID for Fabian, so maybe we need to ping the dev thread?


Repository:
  rL LLVM

https://reviews.llvm.org/D48705





More information about the llvm-commits mailing list