mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-10-02 02:55:35 +00:00
Hoist a convertValue call to the two paths where it is needed.
I noticed this while looking at r170328. We only ever do a vector rewrite when the alloca *is* the vector type, so it's good to not paper over bugs here by doing a convertValue that isn't needed. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170331 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
35150cbf41
commit
5814a88ce9
@ -2807,6 +2807,7 @@ private:
|
|||||||
assert(V->getType() == IntTy &&
|
assert(V->getType() == IntTy &&
|
||||||
"Wrong type for an alloca wide integer!");
|
"Wrong type for an alloca wide integer!");
|
||||||
}
|
}
|
||||||
|
V = convertValue(TD, IRB, V, AllocaTy);
|
||||||
} else {
|
} else {
|
||||||
// Established these invariants above.
|
// Established these invariants above.
|
||||||
assert(BeginOffset == NewAllocaBeginOffset);
|
assert(BeginOffset == NewAllocaBeginOffset);
|
||||||
@ -2814,13 +2815,13 @@ private:
|
|||||||
|
|
||||||
V = getIntegerSplat(IRB, II.getValue(),
|
V = getIntegerSplat(IRB, II.getValue(),
|
||||||
TD.getTypeSizeInBits(ScalarTy)/8);
|
TD.getTypeSizeInBits(ScalarTy)/8);
|
||||||
|
|
||||||
if (VectorType *AllocaVecTy = dyn_cast<VectorType>(AllocaTy))
|
if (VectorType *AllocaVecTy = dyn_cast<VectorType>(AllocaTy))
|
||||||
V = getVectorSplat(IRB, V, AllocaVecTy->getNumElements());
|
V = getVectorSplat(IRB, V, AllocaVecTy->getNumElements());
|
||||||
|
|
||||||
|
V = convertValue(TD, IRB, V, AllocaTy);
|
||||||
}
|
}
|
||||||
|
|
||||||
Value *New = IRB.CreateAlignedStore(convertValue(TD, IRB, V, AllocaTy),
|
Value *New = IRB.CreateAlignedStore(V, &NewAI, NewAI.getAlignment(),
|
||||||
&NewAI, NewAI.getAlignment(),
|
|
||||||
II.isVolatile());
|
II.isVolatile());
|
||||||
(void)New;
|
(void)New;
|
||||||
DEBUG(dbgs() << " to: " << *New << "\n");
|
DEBUG(dbgs() << " to: " << *New << "\n");
|
||||||
|
Loading…
Reference in New Issue
Block a user