[llvm-bugs] [Bug 45232] New: Wrong code generated by PowerPC MI Peephole Optimization

via llvm-bugs llvm-bugs at lists.llvm.org
Tue Mar 17 14:33:24 PDT 2020


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

            Bug ID: 45232
           Summary: Wrong code generated by PowerPC MI Peephole
                    Optimization
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Backend: PowerPC
          Assignee: unassignedbugs at nondot.org
          Reporter: carrot at google.com
                CC: llvm-bugs at lists.llvm.org, nemanja.i.ibm at gmail.com

Created attachment 23249
  --> https://bugs.llvm.org/attachment.cgi?id=23249&action=edit
test

In the attached test case, wrong code is generated for function call to

std::nth_element(values.begin(), middle, values.end())

The second parameter should be a pointer to the middle of vector values, but
values.begin() is actually passed in. It looks PowerPC MI Peephole Optimization
generates the wrong instructions.


The test case can be compiled with
llc -mtriple=powerpc64le-grtev4-linux-gnu  test3.ll

-- 
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/20200317/e13f2e9f/attachment.html>


More information about the llvm-bugs mailing list