mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-03-21 03:32:29 +00:00
Fix scalarrepl to not 'miscompile' undefined code, part #2.
This fixes the store case, my previous patch just fixed the load case. rdar://5707076. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46932 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
ab5d56c6b9
commit
916c954bf2
@ -1150,7 +1150,7 @@ void SROA::ConvertUsesToScalar(Value *Ptr, AllocaInst *NewAI, unsigned Offset) {
|
||||
// then 'or' into place.
|
||||
Value *SV = SI->getOperand(0);
|
||||
const Type *AllocaType = NewAI->getType()->getElementType();
|
||||
if (SV->getType() == AllocaType) {
|
||||
if (SV->getType() == AllocaType && Offset == 0) {
|
||||
// All is well.
|
||||
} else if (const VectorType *PTy = dyn_cast<VectorType>(AllocaType)) {
|
||||
Value *Old = new LoadInst(NewAI, NewAI->getName()+".in", SI);
|
||||
|
Loading…
x
Reference in New Issue
Block a user