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: unassignedb...@nondot.org
          Reporter: car...@google.com
                CC: llvm-bugs@lists.llvm.org, nemanja.i....@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.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to