[llvm-bugs] [Bug 43846] New: optimization missed NRVO

via llvm-bugs llvm-bugs at lists.llvm.org
Wed Oct 30 04:23:23 PDT 2019


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

            Bug ID: 43846
           Summary: optimization missed NRVO
           Product: clang
           Version: 9.0
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: C++14
          Assignee: unassignedclangbugs at nondot.org
          Reporter: boris.oncev at gmail.com
                CC: blitzrakete at gmail.com, erik.pilkington at gmail.com,
                    llvm-bugs at lists.llvm.org, richard-llvm at metafoo.co.uk

mixing templated member function with auto return type misses NRVO
optimization,
while the same code without auto return type does not,
or the same code without the template also optimizes.
code on godbolt:

https://godbolt.org/z/Vzef_3

does the right thing in 3.4.1
and breaks from 3.5 up to 9.0 and trunk

-- 
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/20191030/d9d620e8/attachment.html>


More information about the llvm-bugs mailing list