[llvm] r177874 - [arm load/store optimizer] When trying to merge a base update load/store, make
Chad Rosier
mcrosier at apple.com
Mon Mar 25 09:29:21 PDT 2013
Author: mcrosier
Date: Mon Mar 25 11:29:20 2013
New Revision: 177874
URL: http://llvm.org/viewvc/llvm-project?rev=177874&view=rev
Log:
[arm load/store optimizer] When trying to merge a base update load/store, make
sure the base register and would-be writeback register don't conflict for
stores. This was already being done for loads.
Unfortunately, it is rather difficult to create a test case for this issue. It
was exposed in 450.soplex at LTO and requires unlucky register allocation.
<rdar://13394908>
Modified:
llvm/trunk/lib/Target/ARM/ARMLoadStoreOptimizer.cpp
Modified: llvm/trunk/lib/Target/ARM/ARMLoadStoreOptimizer.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMLoadStoreOptimizer.cpp?rev=177874&r1=177873&r2=177874&view=diff
==============================================================================
--- llvm/trunk/lib/Target/ARM/ARMLoadStoreOptimizer.cpp (original)
+++ llvm/trunk/lib/Target/ARM/ARMLoadStoreOptimizer.cpp Mon Mar 25 11:29:20 2013
@@ -865,7 +865,7 @@ bool ARMLoadStoreOpt::MergeBaseUpdateLoa
bool isLd = isi32Load(Opcode) || Opcode == ARM::VLDRS || Opcode == ARM::VLDRD;
// Can't do the merge if the destination register is the same as the would-be
// writeback register.
- if (isLd && MI->getOperand(0).getReg() == Base)
+ if (MI->getOperand(0).getReg() == Base)
return false;
unsigned PredReg = 0;
More information about the llvm-commits
mailing list