mirror of
https://github.com/RPCS3/llvm.git
synced 2026-07-19 15:13:49 -04:00
Revert r348645 - "[MemCpyOpt] memset->memcpy forwarding with undef tail"
This revision caused trucated memsets for structs with padding. See: http://lists.llvm.org/pipermail/llvm-commits/Week-of-Mon-20181210/610520.html git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349002 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -154,12 +154,6 @@ static ModRefInfo GetLocation(const Instruction *Inst, MemoryLocation &Loc,
|
||||
return ModRefInfo::Mod;
|
||||
}
|
||||
|
||||
if (const MemSetInst *MI = dyn_cast<MemSetInst>(Inst)) {
|
||||
Loc = MemoryLocation::getForDest(MI);
|
||||
// Conversatively assume ModRef for volatile memset.
|
||||
return MI->isVolatile() ? ModRefInfo::ModRef : ModRefInfo::Mod;
|
||||
}
|
||||
|
||||
if (const IntrinsicInst *II = dyn_cast<IntrinsicInst>(Inst)) {
|
||||
switch (II->getIntrinsicID()) {
|
||||
case Intrinsic::lifetime_start:
|
||||
|
||||
Reference in New Issue
Block a user