[llvm-bugs] [Bug 36316] New: Missed optimization of code deduplication

via llvm-bugs llvm-bugs at lists.llvm.org
Fri Feb 9 00:15:58 PST 2018


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

            Bug ID: 36316
           Summary: Missed optimization of code deduplication
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: LLVM Codegen
          Assignee: unassignedclangbugs at nondot.org
          Reporter: mafagafogigante at gmail.com
                CC: llvm-bugs at lists.llvm.org

Created attachment 19847
  --> https://bugs.llvm.org/attachment.cgi?id=19847&action=edit
C++, followed by the ASM outputs

I've included the minimum source code required and the relevant ASM output for
GCC (trunk) and Clang (trunk).

The GCC output does not issue duplicated code for isNice(), which makes its
version relatively shorter. Clang, on the other hand, (I assume) fails to
identify this optimization opportunity.

For convenience, here is a Godbolt link: https://godbolt.org/g/ijuNMb

-- 
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/20180209/ad5b1b86/attachment.html>


More information about the llvm-bugs mailing list