[llvm-bugs] [Bug 29148] New: LoadStoreVectorizer crashes with out of bounds access to SetVector

via llvm-bugs llvm-bugs at lists.llvm.org
Fri Aug 26 00:38:44 PDT 2016


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

            Bug ID: 29148
           Summary: LoadStoreVectorizer crashes with out of bounds access
                    to SetVector
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: Scalar Optimizations
          Assignee: unassignedbugs at nondot.org
          Reporter: Matthew.Arsenault at amd.com
                CC: llvm-bugs at lists.llvm.org
    Classification: Unclassified

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

This loop looks suspicious:

for (int Head : Heads) {
    if (InstructionsProcessed.count(Instrs[Head]))
      continue;
    bool longerChainExists = false;
    for (unsigned TIt = 0; TIt < Tails.size(); TIt++) {
      if (Head == Tails[TIt] &&
          !InstructionsProcessed.count(Instrs[Heads[TIt]])) {

The loop over tails is indexing into Heads with TIt. If I fix this, all tests
pass except for X86/subchain-interleaved.ll, which then fails to vectorize some
of the cases

-- 
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/20160826/c87b17da/attachment-0001.html>


More information about the llvm-bugs mailing list