Fix bug:17136: RescheduleOps of ARMLoadStoreOptimizer

Weiming Zhao weimingz at
Tue Sep 24 10:28:51 PDT 2013



This patches fixes bug 17136 (ARMLoadStoreOptimizer):


In ARMPreAllocLoadStoreOpt::RescheduleOps():


The loop below is supposed to insert top n Ops into MemOps. But now it's
inserting bottom n Ops:


    for (int i = NumMove-1; i >= 0; --i) {





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());



Please help to review the patch.





Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by
The Linux Foundation


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-PR-17136-Fix-RescheduleOps-of-ARMLoadStoreOptimizer.patch
Type: application/octet-stream
Size: 1089 bytes
Desc: not available
URL: <>

More information about the llvm-commits mailing list