[PATCH] D46760: [InstCombine] Enhance narrowUDivURem.

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 24 05:55:59 PDT 2019


spatel added a comment.

In D46760#1553974 <https://reviews.llvm.org/D46760#1553974>, @lebedev.ri wrote:

> @spatel where we're at with funnel-shift canonicalization with constant shift amounts?
>  Is it time to fix this via fixing https://bugs.llvm.org/show_bug.cgi?id=37872 ?


Yes, I can make that change. I'm not aware of any gaps in IR analysis for funnel-shift / rotate at this point, and the expansion in SDAG should be identical to the current IR sequence:

  or (shl X, C), (lshr X, (width - C))

With a constant shift amount, we eliminate the variations and concerns about branch/select/trunc/ext/UB/poison that may exist in the variable shift amount patterns.


Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D46760/new/

https://reviews.llvm.org/D46760





More information about the llvm-commits mailing list