[llvm-bugs] [Bug 52205] New: Instcombine breaks apart std::clamp, X86 backend is unable to reconstruct

via llvm-bugs llvm-bugs at lists.llvm.org
Mon Oct 18 03:22:13 PDT 2021


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

            Bug ID: 52205
           Summary: Instcombine breaks apart std::clamp, X86 backend is
                    unable to reconstruct
           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

-stdlib=libc++ isn't important here, there's some phase ordering behaviour
that prevents the issue with libstdc++ on the snippet, but not on the orig src.

https://godbolt.org/z/qhhWW74Tf

It sunk trunc into the last select,
and skipped non-sign-changing ashr in the first comparison.

-- 
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/20211018/ba2faee4/attachment.html>


More information about the llvm-bugs mailing list