mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-09-27 16:17:17 +00:00
Simplify code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122561 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -787,7 +787,7 @@ bool MemCpyOpt::processMemCpy(MemCpyInst *M) {
|
|||||||
|
|
||||||
// If copying from a constant, try to turn the memcpy into a memset.
|
// If copying from a constant, try to turn the memcpy into a memset.
|
||||||
if (GlobalVariable *GV = dyn_cast<GlobalVariable>(M->getSource()))
|
if (GlobalVariable *GV = dyn_cast<GlobalVariable>(M->getSource()))
|
||||||
if (!GV->mayBeOverridden() && GV->isConstant() && GV->hasInitializer())
|
if (GV->isConstant() && GV->hasDefinitiveInitializer())
|
||||||
if (Value *ByteVal = isBytewiseValue(GV->getInitializer())) {
|
if (Value *ByteVal = isBytewiseValue(GV->getInitializer())) {
|
||||||
Value *Ops[] = {
|
Value *Ops[] = {
|
||||||
M->getRawDest(), ByteVal, // Start, value
|
M->getRawDest(), ByteVal, // Start, value
|
||||||
|
Reference in New Issue
Block a user