[llvm-bugs] [Bug 47795] New: [InstCombine] Failure to form funnel shifts for (shl ShVal, X) | (lshr ShVal, (Width - x)) when (Width - x) has multiple uses like for another funnel shift

via llvm-bugs llvm-bugs at lists.llvm.org
Sun Oct 11 13:21:04 PDT 2020


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

            Bug ID: 47795
           Summary: [InstCombine] Failure to form funnel shifts for (shl
                    ShVal, X) | (lshr ShVal, (Width - x)) when (Width - x)
                    has multiple uses like for another funnel shift
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Scalar Optimizations
          Assignee: unassignedbugs at nondot.org
          Reporter: craig.topper at gmail.com
                CC: llvm-bugs at lists.llvm.org

As shown here https://skanthak.homepage.t-online.de/llvm.html#case21 or
https://godbolt.org/z/s4bGGs

Removing the m_OneUse here

-    if (match(R, m_OneUse(m_Sub(m_SpecificInt(Width), m_Specific(L))))) {
+    if (match(R, m_Sub(m_SpecificInt(Width), m_Specific(L)))) {


Allows a funnel shift to be generated in bb.20

I suppose removing this may be bad if the target doesn't support funnel shift
natively?

-- 
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/20201011/13444c67/attachment.html>


More information about the llvm-bugs mailing list