mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-15 07:34:33 +00:00
don't lose TD info
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122556 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
7569d79de1
commit
ae47be1ea0
@ -122,7 +122,7 @@ Instruction *InstCombiner::SimplifyMemTransfer(MemIntrinsic *MI) {
|
||||
}
|
||||
|
||||
Instruction *InstCombiner::SimplifyMemSet(MemSetInst *MI) {
|
||||
unsigned Alignment = getKnownAlignment(MI->getDest());
|
||||
unsigned Alignment = getKnownAlignment(MI->getDest(), TD);
|
||||
if (MI->getAlignment() < Alignment) {
|
||||
MI->setAlignment(ConstantInt::get(MI->getAlignmentType(),
|
||||
Alignment, false));
|
||||
@ -629,7 +629,7 @@ Instruction *InstCombiner::visitCallInst(CallInst &CI) {
|
||||
case Intrinsic::arm_neon_vst2lane:
|
||||
case Intrinsic::arm_neon_vst3lane:
|
||||
case Intrinsic::arm_neon_vst4lane: {
|
||||
unsigned MemAlign = getKnownAlignment(II->getArgOperand(0));
|
||||
unsigned MemAlign = getKnownAlignment(II->getArgOperand(0), TD);
|
||||
unsigned AlignArg = II->getNumArgOperands() - 1;
|
||||
ConstantInt *IntrAlign = dyn_cast<ConstantInt>(II->getArgOperand(AlignArg));
|
||||
if (IntrAlign && IntrAlign->getZExtValue() < MemAlign) {
|
||||
|
@ -715,7 +715,7 @@ unsigned llvm::getOrEnforceKnownAlignment(Value *V, unsigned PrefAlign,
|
||||
unsigned BitWidth = TD ? TD->getPointerSizeInBits() : 64;
|
||||
APInt Mask = APInt::getAllOnesValue(BitWidth);
|
||||
APInt KnownZero(BitWidth, 0), KnownOne(BitWidth, 0);
|
||||
ComputeMaskedBits(V, Mask, KnownZero, KnownOne);
|
||||
ComputeMaskedBits(V, Mask, KnownZero, KnownOne, TD);
|
||||
unsigned TrailZ = KnownZero.countTrailingOnes();
|
||||
|
||||
// Avoid trouble with rediculously large TrailZ values, such as
|
||||
|
Loading…
x
Reference in New Issue
Block a user