[llvm-bugs] [Bug 37872] New: Instcombine: transform shl(inexact shr(x)) with different constant shifts.

via llvm-bugs llvm-bugs at lists.llvm.org
Wed Jun 20 01:13:08 PDT 2018


https://bugs.llvm.org/show_bug.cgi?id=37872

            Bug ID: 37872
           Summary: Instcombine: transform shl(inexact shr(x)) with
                    different constant shifts.
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Scalar Optimizations
          Assignee: unassignedbugs at nondot.org
          Reporter: lebedev.ri at gmail.com
                CC: llvm-bugs at lists.llvm.org

IIn https://reviews.llvm.org/D46760#1123713, Sanjay Patel suggests transforming
lshr+shl into mask(and)+shl, which is not only a canonicalization, but
would also sidestep the problem which D46760 is trying to fix.

This canonicalization is already being done for the non-constants,
or equal constants, but not unequal constants.

The commit that introduced that restriction: https://reviews.llvm.org/rL155136
suggests that said transform negatively impacts backend (rotate instruction),
and SCEV.
The backend part will likely be resolved in https://reviews.llvm.org/D47681 or
followups.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20180620/ee8e36e3/attachment.html>


More information about the llvm-bugs mailing list