1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 11:02:59 +02:00

Simplify code.

llvm-svn: 122561
This commit is contained in:
Benjamin Kramer 2010-12-26 15:23:45 +00:00
parent a6f2b8316f
commit 626fccab8b

View File

@ -787,7 +787,7 @@ bool MemCpyOpt::processMemCpy(MemCpyInst *M) {
// If copying from a constant, try to turn the memcpy into a memset.
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())) {
Value *Ops[] = {
M->getRawDest(), ByteVal, // Start, value