[LLVMbugs] [Bug 17136] New: ARMLoadStoreOptimizer: MemOps selected incorrectly

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Fri Sep 6 16:37:35 PDT 2013


http://llvm.org/bugs/show_bug.cgi?id=17136

            Bug ID: 17136
           Summary: ARMLoadStoreOptimizer: MemOps selected incorrectly
           Product: new-bugs
           Version: trunk
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: normal
          Priority: P
         Component: new bugs
          Assignee: unassignedbugs at nondot.org
          Reporter: weimingz at codeaurora.org
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

I debugged a mis-scheduled code and found that it was caused by
ARMLoadStoreOptimizer.

In ARMPreAllocLoadStoreOpt::RescheduleOps():

The loop below is supposed to insert NumMove number of ops into MemOps and
MemRegs from top of Ops but now it's inserting

    for (int i = NumMove-1; i >= 0; --i) {
        MemOps.insert(Ops[i]);
        MemRegs.insert(Ops[i]->getOperand(0).getReg());
      }

It should be
 for (int i = NumMove-1; i >= 0; --i) {
   MemOps.insert(Ops[Ops.size() - 1 - i]);
   MemRegs.insert(Ops[Ops.size() - 1 - i]->getOperand(0).getReg());
  }

-- 
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/20130906/efd88f24/attachment.html>


More information about the llvm-bugs mailing list