[llvm-bugs] [Bug 35202] New: Codegen for x86 produces an unnecessary cmp instruction.

via llvm-bugs llvm-bugs at lists.llvm.org
Fri Nov 3 23:16:45 PDT 2017


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

            Bug ID: 35202
           Summary: Codegen for x86 produces an unnecessary cmp
                    instruction.
           Product: new-bugs
           Version: trunk
          Hardware: PC
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: new bugs
          Assignee: unassignedbugs at nondot.org
          Reporter: denis.yaroshevskij at gmail.com
                CC: llvm-bugs at lists.llvm.org

Clang figures out that it can omit cmp instruction, when you use equality, but
doesn't if you use a reverse comparison (which is a very common thing to do, in
STL for example).

godbolt: https://godbolt.org/g/Wy9eWR

-- 
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/20171104/963056d0/attachment-0001.html>


More information about the llvm-bugs mailing list