mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-14 11:32:34 +00:00
tryMergingIntoMemset can only handle constant length memsets.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123090 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
d90a192279
commit
0468e3e265
@ -515,11 +515,12 @@ bool MemCpyOpt::processStore(StoreInst *SI, BasicBlock::iterator &BBI) {
|
||||
bool MemCpyOpt::processMemSet(MemSetInst *MSI, BasicBlock::iterator &BBI) {
|
||||
// See if there is another memset or store neighboring this memset which
|
||||
// allows us to widen out the memset to do a single larger store.
|
||||
if (Instruction *I = tryMergingIntoMemset(MSI, MSI->getDest(),
|
||||
MSI->getValue())) {
|
||||
BBI = I; // Don't invalidate iterator.
|
||||
return true;
|
||||
}
|
||||
if (isa<ConstantInt>(MSI->getLength()) && !MSI->isVolatile())
|
||||
if (Instruction *I = tryMergingIntoMemset(MSI, MSI->getDest(),
|
||||
MSI->getValue())) {
|
||||
BBI = I; // Don't invalidate iterator.
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user