forked from OSchip/llvm-project
[LLVM][Alignment] Introduce Alignment Type
Summary: This is patch is part of a serie to introduce an Alignment type. See this thread for context: http://lists.llvm.org/pipermail/llvm-dev/2019-July/133851.html See this patch for the introduction of the type: https://reviews.llvm.org/D64790 Reviewers: courbet, jfb, jakehehrlich Reviewed By: jfb Subscribers: wuzish, jholewinski, arsenm, dschuff, nemanjai, jvesely, nhaehnle, javed.absar, sbc100, jgravelle-google, hiraditya, aheejin, kbarton, asb, rbar, johnrusso, simoncook, apazos, sabuasal, niosHD, jrtc27, MaskRay, zzheng, edward-jones, rogfer01, MartinMosbeck, brucehoult, the_o, dexonsmith, PkmX, jocewei, jsji, s.egerton, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D65514 llvm-svn: 367828
This commit is contained in:
parent
ef72cded32
commit
c97a3d15d2
|
@ -48,6 +48,7 @@
|
|||
#include "llvm/IR/Instructions.h"
|
||||
#include "llvm/IR/Type.h"
|
||||
#include "llvm/MC/MCRegisterInfo.h"
|
||||
#include "llvm/Support/Alignment.h"
|
||||
#include "llvm/Support/AtomicOrdering.h"
|
||||
#include "llvm/Support/Casting.h"
|
||||
#include "llvm/Support/ErrorHandling.h"
|
||||
|
@ -838,7 +839,7 @@ public:
|
|||
int offset = 0; // offset off of ptrVal
|
||||
unsigned size = 0; // the size of the memory location
|
||||
// (taken from memVT if zero)
|
||||
unsigned align = 1; // alignment
|
||||
MaybeAlign align = Align(1); // alignment
|
||||
|
||||
MachineMemOperand::Flags flags = MachineMemOperand::MONone;
|
||||
IntrinsicInfo() = default;
|
||||
|
|
|
@ -1623,13 +1623,14 @@ bool IRTranslator::translateCall(const User &U, MachineIRBuilder &MIRBuilder) {
|
|||
TargetLowering::IntrinsicInfo Info;
|
||||
// TODO: Add a GlobalISel version of getTgtMemIntrinsic.
|
||||
if (TLI.getTgtMemIntrinsic(Info, CI, *MF, ID)) {
|
||||
unsigned Align = Info.align;
|
||||
if (Align == 0)
|
||||
Align = DL->getABITypeAlignment(Info.memVT.getTypeForEVT(F->getContext()));
|
||||
MaybeAlign Align = Info.align;
|
||||
if (!Align)
|
||||
Align = MaybeAlign(
|
||||
DL->getABITypeAlignment(Info.memVT.getTypeForEVT(F->getContext())));
|
||||
|
||||
uint64_t Size = Info.memVT.getStoreSize();
|
||||
MIB.addMemOperand(MF->getMachineMemOperand(MachinePointerInfo(Info.ptrVal),
|
||||
Info.flags, Size, Align));
|
||||
MIB.addMemOperand(MF->getMachineMemOperand(
|
||||
MachinePointerInfo(Info.ptrVal), Info.flags, Size, Align->value()));
|
||||
}
|
||||
|
||||
return true;
|
||||
|
|
|
@ -4748,10 +4748,10 @@ void SelectionDAGBuilder::visitTargetIntrinsic(const CallInst &I,
|
|||
// This is target intrinsic that touches memory
|
||||
AAMDNodes AAInfo;
|
||||
I.getAAMetadata(AAInfo);
|
||||
Result =
|
||||
DAG.getMemIntrinsicNode(Info.opc, getCurSDLoc(), VTs, Ops, Info.memVT,
|
||||
MachinePointerInfo(Info.ptrVal, Info.offset),
|
||||
Info.align, Info.flags, Info.size, AAInfo);
|
||||
Result = DAG.getMemIntrinsicNode(
|
||||
Info.opc, getCurSDLoc(), VTs, Ops, Info.memVT,
|
||||
MachinePointerInfo(Info.ptrVal, Info.offset),
|
||||
Info.align ? Info.align->value() : 0, Info.flags, Info.size, AAInfo);
|
||||
} else if (!HasChain) {
|
||||
Result = DAG.getNode(ISD::INTRINSIC_WO_CHAIN, getCurSDLoc(), VTs, Ops);
|
||||
} else if (!I.getType()->isVoidTy()) {
|
||||
|
|
|
@ -8096,7 +8096,7 @@ bool AArch64TargetLowering::getTgtMemIntrinsic(IntrinsicInfo &Info,
|
|||
Info.memVT = EVT::getVectorVT(I.getType()->getContext(), MVT::i64, NumElts);
|
||||
Info.ptrVal = I.getArgOperand(I.getNumArgOperands() - 1);
|
||||
Info.offset = 0;
|
||||
Info.align = 0;
|
||||
Info.align.reset();
|
||||
// volatile loads with NEON intrinsics not supported
|
||||
Info.flags = MachineMemOperand::MOLoad;
|
||||
return true;
|
||||
|
@ -8122,7 +8122,7 @@ bool AArch64TargetLowering::getTgtMemIntrinsic(IntrinsicInfo &Info,
|
|||
Info.memVT = EVT::getVectorVT(I.getType()->getContext(), MVT::i64, NumElts);
|
||||
Info.ptrVal = I.getArgOperand(I.getNumArgOperands() - 1);
|
||||
Info.offset = 0;
|
||||
Info.align = 0;
|
||||
Info.align.reset();
|
||||
// volatile stores with NEON intrinsics not supported
|
||||
Info.flags = MachineMemOperand::MOStore;
|
||||
return true;
|
||||
|
@ -8134,7 +8134,7 @@ bool AArch64TargetLowering::getTgtMemIntrinsic(IntrinsicInfo &Info,
|
|||
Info.memVT = MVT::getVT(PtrTy->getElementType());
|
||||
Info.ptrVal = I.getArgOperand(0);
|
||||
Info.offset = 0;
|
||||
Info.align = DL.getABITypeAlignment(PtrTy->getElementType());
|
||||
Info.align = MaybeAlign(DL.getABITypeAlignment(PtrTy->getElementType()));
|
||||
Info.flags = MachineMemOperand::MOLoad | MachineMemOperand::MOVolatile;
|
||||
return true;
|
||||
}
|
||||
|
@ -8145,7 +8145,7 @@ bool AArch64TargetLowering::getTgtMemIntrinsic(IntrinsicInfo &Info,
|
|||
Info.memVT = MVT::getVT(PtrTy->getElementType());
|
||||
Info.ptrVal = I.getArgOperand(1);
|
||||
Info.offset = 0;
|
||||
Info.align = DL.getABITypeAlignment(PtrTy->getElementType());
|
||||
Info.align = MaybeAlign(DL.getABITypeAlignment(PtrTy->getElementType()));
|
||||
Info.flags = MachineMemOperand::MOStore | MachineMemOperand::MOVolatile;
|
||||
return true;
|
||||
}
|
||||
|
@ -8155,7 +8155,7 @@ bool AArch64TargetLowering::getTgtMemIntrinsic(IntrinsicInfo &Info,
|
|||
Info.memVT = MVT::i128;
|
||||
Info.ptrVal = I.getArgOperand(0);
|
||||
Info.offset = 0;
|
||||
Info.align = 16;
|
||||
Info.align = Align(16);
|
||||
Info.flags = MachineMemOperand::MOLoad | MachineMemOperand::MOVolatile;
|
||||
return true;
|
||||
case Intrinsic::aarch64_stlxp:
|
||||
|
@ -8164,7 +8164,7 @@ bool AArch64TargetLowering::getTgtMemIntrinsic(IntrinsicInfo &Info,
|
|||
Info.memVT = MVT::i128;
|
||||
Info.ptrVal = I.getArgOperand(2);
|
||||
Info.offset = 0;
|
||||
Info.align = 16;
|
||||
Info.align = Align(16);
|
||||
Info.flags = MachineMemOperand::MOStore | MachineMemOperand::MOVolatile;
|
||||
return true;
|
||||
default:
|
||||
|
|
|
@ -909,7 +909,7 @@ bool SITargetLowering::getTgtMemIntrinsic(IntrinsicInfo &Info,
|
|||
Info.ptrVal = MFI->getImagePSV(
|
||||
*MF.getSubtarget<GCNSubtarget>().getInstrInfo(),
|
||||
CI.getArgOperand(RsrcIntr->RsrcArg));
|
||||
Info.align = 0;
|
||||
Info.align.reset();
|
||||
} else {
|
||||
Info.ptrVal = MFI->getBufferPSV(
|
||||
*MF.getSubtarget<GCNSubtarget>().getInstrInfo(),
|
||||
|
@ -955,7 +955,7 @@ bool SITargetLowering::getTgtMemIntrinsic(IntrinsicInfo &Info,
|
|||
Info.opc = ISD::INTRINSIC_W_CHAIN;
|
||||
Info.memVT = MVT::getVT(CI.getType());
|
||||
Info.ptrVal = CI.getOperand(0);
|
||||
Info.align = 0;
|
||||
Info.align.reset();
|
||||
Info.flags = MachineMemOperand::MOLoad | MachineMemOperand::MOStore;
|
||||
|
||||
const ConstantInt *Vol = cast<ConstantInt>(CI.getOperand(4));
|
||||
|
@ -972,7 +972,7 @@ bool SITargetLowering::getTgtMemIntrinsic(IntrinsicInfo &Info,
|
|||
Info.ptrVal = MFI->getBufferPSV(
|
||||
*MF.getSubtarget<GCNSubtarget>().getInstrInfo(),
|
||||
CI.getArgOperand(1));
|
||||
Info.align = 0;
|
||||
Info.align.reset();
|
||||
Info.flags = MachineMemOperand::MOLoad | MachineMemOperand::MOStore;
|
||||
|
||||
const ConstantInt *Vol = dyn_cast<ConstantInt>(CI.getOperand(4));
|
||||
|
@ -986,7 +986,7 @@ bool SITargetLowering::getTgtMemIntrinsic(IntrinsicInfo &Info,
|
|||
Info.memVT = MVT::getVT(CI.getOperand(0)->getType()
|
||||
->getPointerElementType());
|
||||
Info.ptrVal = CI.getOperand(0);
|
||||
Info.align = 0;
|
||||
Info.align.reset();
|
||||
Info.flags = MachineMemOperand::MOLoad | MachineMemOperand::MOStore;
|
||||
|
||||
return true;
|
||||
|
@ -996,7 +996,7 @@ bool SITargetLowering::getTgtMemIntrinsic(IntrinsicInfo &Info,
|
|||
Info.opc = ISD::INTRINSIC_W_CHAIN;
|
||||
Info.memVT = MVT::getVT(CI.getType());
|
||||
Info.ptrVal = CI.getOperand(0);
|
||||
Info.align = 0;
|
||||
Info.align.reset();
|
||||
Info.flags = MachineMemOperand::MOLoad | MachineMemOperand::MOStore;
|
||||
|
||||
const ConstantInt *Vol = cast<ConstantInt>(CI.getOperand(1));
|
||||
|
@ -1020,7 +1020,7 @@ bool SITargetLowering::getTgtMemIntrinsic(IntrinsicInfo &Info,
|
|||
// This is an abstract access, but we need to specify a type and size.
|
||||
Info.memVT = MVT::i32;
|
||||
Info.size = 4;
|
||||
Info.align = 4;
|
||||
Info.align = Align(4);
|
||||
|
||||
Info.flags = MachineMemOperand::MOStore;
|
||||
if (IntrID == Intrinsic::amdgcn_ds_gws_barrier)
|
||||
|
|
|
@ -15623,7 +15623,7 @@ bool ARMTargetLowering::getTgtMemIntrinsic(IntrinsicInfo &Info,
|
|||
Info.ptrVal = I.getArgOperand(0);
|
||||
Info.offset = 0;
|
||||
Value *AlignArg = I.getArgOperand(I.getNumArgOperands() - 1);
|
||||
Info.align = cast<ConstantInt>(AlignArg)->getZExtValue();
|
||||
Info.align = MaybeAlign(cast<ConstantInt>(AlignArg)->getZExtValue());
|
||||
// volatile loads with NEON intrinsics not supported
|
||||
Info.flags = MachineMemOperand::MOLoad;
|
||||
return true;
|
||||
|
@ -15638,7 +15638,7 @@ bool ARMTargetLowering::getTgtMemIntrinsic(IntrinsicInfo &Info,
|
|||
Info.memVT = EVT::getVectorVT(I.getType()->getContext(), MVT::i64, NumElts);
|
||||
Info.ptrVal = I.getArgOperand(I.getNumArgOperands() - 1);
|
||||
Info.offset = 0;
|
||||
Info.align = 0;
|
||||
Info.align.reset();
|
||||
// volatile loads with NEON intrinsics not supported
|
||||
Info.flags = MachineMemOperand::MOLoad;
|
||||
return true;
|
||||
|
@ -15664,7 +15664,7 @@ bool ARMTargetLowering::getTgtMemIntrinsic(IntrinsicInfo &Info,
|
|||
Info.ptrVal = I.getArgOperand(0);
|
||||
Info.offset = 0;
|
||||
Value *AlignArg = I.getArgOperand(I.getNumArgOperands() - 1);
|
||||
Info.align = cast<ConstantInt>(AlignArg)->getZExtValue();
|
||||
Info.align = MaybeAlign(cast<ConstantInt>(AlignArg)->getZExtValue());
|
||||
// volatile stores with NEON intrinsics not supported
|
||||
Info.flags = MachineMemOperand::MOStore;
|
||||
return true;
|
||||
|
@ -15685,7 +15685,7 @@ bool ARMTargetLowering::getTgtMemIntrinsic(IntrinsicInfo &Info,
|
|||
Info.memVT = EVT::getVectorVT(I.getType()->getContext(), MVT::i64, NumElts);
|
||||
Info.ptrVal = I.getArgOperand(0);
|
||||
Info.offset = 0;
|
||||
Info.align = 0;
|
||||
Info.align.reset();
|
||||
// volatile stores with NEON intrinsics not supported
|
||||
Info.flags = MachineMemOperand::MOStore;
|
||||
return true;
|
||||
|
@ -15698,7 +15698,7 @@ bool ARMTargetLowering::getTgtMemIntrinsic(IntrinsicInfo &Info,
|
|||
Info.memVT = MVT::getVT(PtrTy->getElementType());
|
||||
Info.ptrVal = I.getArgOperand(0);
|
||||
Info.offset = 0;
|
||||
Info.align = DL.getABITypeAlignment(PtrTy->getElementType());
|
||||
Info.align = MaybeAlign(DL.getABITypeAlignment(PtrTy->getElementType()));
|
||||
Info.flags = MachineMemOperand::MOLoad | MachineMemOperand::MOVolatile;
|
||||
return true;
|
||||
}
|
||||
|
@ -15710,7 +15710,7 @@ bool ARMTargetLowering::getTgtMemIntrinsic(IntrinsicInfo &Info,
|
|||
Info.memVT = MVT::getVT(PtrTy->getElementType());
|
||||
Info.ptrVal = I.getArgOperand(1);
|
||||
Info.offset = 0;
|
||||
Info.align = DL.getABITypeAlignment(PtrTy->getElementType());
|
||||
Info.align = MaybeAlign(DL.getABITypeAlignment(PtrTy->getElementType()));
|
||||
Info.flags = MachineMemOperand::MOStore | MachineMemOperand::MOVolatile;
|
||||
return true;
|
||||
}
|
||||
|
@ -15720,7 +15720,7 @@ bool ARMTargetLowering::getTgtMemIntrinsic(IntrinsicInfo &Info,
|
|||
Info.memVT = MVT::i64;
|
||||
Info.ptrVal = I.getArgOperand(2);
|
||||
Info.offset = 0;
|
||||
Info.align = 8;
|
||||
Info.align = Align(8);
|
||||
Info.flags = MachineMemOperand::MOStore | MachineMemOperand::MOVolatile;
|
||||
return true;
|
||||
|
||||
|
@ -15730,7 +15730,7 @@ bool ARMTargetLowering::getTgtMemIntrinsic(IntrinsicInfo &Info,
|
|||
Info.memVT = MVT::i64;
|
||||
Info.ptrVal = I.getArgOperand(0);
|
||||
Info.offset = 0;
|
||||
Info.align = 8;
|
||||
Info.align = Align(8);
|
||||
Info.flags = MachineMemOperand::MOLoad | MachineMemOperand::MOVolatile;
|
||||
return true;
|
||||
|
||||
|
|
|
@ -1783,7 +1783,8 @@ bool HexagonTargetLowering::getTgtMemIntrinsic(IntrinsicInfo &Info,
|
|||
// The offset value comes through Modifier register. For now, assume the
|
||||
// offset is 0.
|
||||
Info.offset = 0;
|
||||
Info.align = DL.getABITypeAlignment(Info.memVT.getTypeForEVT(Cont));
|
||||
Info.align =
|
||||
MaybeAlign(DL.getABITypeAlignment(Info.memVT.getTypeForEVT(Cont)));
|
||||
Info.flags = MachineMemOperand::MOLoad;
|
||||
return true;
|
||||
}
|
||||
|
@ -1805,7 +1806,8 @@ bool HexagonTargetLowering::getTgtMemIntrinsic(IntrinsicInfo &Info,
|
|||
Info.memVT = MVT::getVT(VecTy);
|
||||
Info.ptrVal = I.getArgOperand(0);
|
||||
Info.offset = 0;
|
||||
Info.align = M.getDataLayout().getTypeAllocSizeInBits(VecTy) / 8;
|
||||
Info.align =
|
||||
MaybeAlign(M.getDataLayout().getTypeAllocSizeInBits(VecTy) / 8);
|
||||
Info.flags = MachineMemOperand::MOLoad |
|
||||
MachineMemOperand::MOStore |
|
||||
MachineMemOperand::MOVolatile;
|
||||
|
|
|
@ -3497,7 +3497,7 @@ bool NVPTXTargetLowering::getTgtMemIntrinsic(
|
|||
Info.ptrVal = I.getArgOperand(0);
|
||||
Info.offset = 0;
|
||||
Info.flags = MachineMemOperand::MOLoad;
|
||||
Info.align = 16;
|
||||
Info.align = Align(16);
|
||||
return true;
|
||||
}
|
||||
case Intrinsic::nvvm_wmma_m16n16k16_load_a_s8_col:
|
||||
|
@ -3521,7 +3521,7 @@ bool NVPTXTargetLowering::getTgtMemIntrinsic(
|
|||
Info.ptrVal = I.getArgOperand(0);
|
||||
Info.offset = 0;
|
||||
Info.flags = MachineMemOperand::MOLoad;
|
||||
Info.align = 8;
|
||||
Info.align = Align(8);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -3547,7 +3547,7 @@ bool NVPTXTargetLowering::getTgtMemIntrinsic(
|
|||
Info.ptrVal = I.getArgOperand(0);
|
||||
Info.offset = 0;
|
||||
Info.flags = MachineMemOperand::MOLoad;
|
||||
Info.align = 16;
|
||||
Info.align = Align(16);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -3585,7 +3585,7 @@ bool NVPTXTargetLowering::getTgtMemIntrinsic(
|
|||
Info.ptrVal = I.getArgOperand(0);
|
||||
Info.offset = 0;
|
||||
Info.flags = MachineMemOperand::MOLoad;
|
||||
Info.align = 4;
|
||||
Info.align = Align(4);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -3606,7 +3606,7 @@ bool NVPTXTargetLowering::getTgtMemIntrinsic(
|
|||
Info.ptrVal = I.getArgOperand(0);
|
||||
Info.offset = 0;
|
||||
Info.flags = MachineMemOperand::MOLoad;
|
||||
Info.align = 16;
|
||||
Info.align = Align(16);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -3627,7 +3627,7 @@ bool NVPTXTargetLowering::getTgtMemIntrinsic(
|
|||
Info.ptrVal = I.getArgOperand(0);
|
||||
Info.offset = 0;
|
||||
Info.flags = MachineMemOperand::MOLoad;
|
||||
Info.align = 16;
|
||||
Info.align = Align(16);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -3648,7 +3648,7 @@ bool NVPTXTargetLowering::getTgtMemIntrinsic(
|
|||
Info.ptrVal = I.getArgOperand(0);
|
||||
Info.offset = 0;
|
||||
Info.flags = MachineMemOperand::MOLoad;
|
||||
Info.align = 16;
|
||||
Info.align = Align(16);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -3665,7 +3665,7 @@ bool NVPTXTargetLowering::getTgtMemIntrinsic(
|
|||
Info.ptrVal = I.getArgOperand(0);
|
||||
Info.offset = 0;
|
||||
Info.flags = MachineMemOperand::MOLoad;
|
||||
Info.align = 8;
|
||||
Info.align = Align(8);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -3686,7 +3686,7 @@ bool NVPTXTargetLowering::getTgtMemIntrinsic(
|
|||
Info.ptrVal = I.getArgOperand(0);
|
||||
Info.offset = 0;
|
||||
Info.flags = MachineMemOperand::MOStore;
|
||||
Info.align = 16;
|
||||
Info.align = Align(16);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -3707,7 +3707,7 @@ bool NVPTXTargetLowering::getTgtMemIntrinsic(
|
|||
Info.ptrVal = I.getArgOperand(0);
|
||||
Info.offset = 0;
|
||||
Info.flags = MachineMemOperand::MOStore;
|
||||
Info.align = 16;
|
||||
Info.align = Align(16);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -3728,7 +3728,7 @@ bool NVPTXTargetLowering::getTgtMemIntrinsic(
|
|||
Info.ptrVal = I.getArgOperand(0);
|
||||
Info.offset = 0;
|
||||
Info.flags = MachineMemOperand::MOStore;
|
||||
Info.align = 16;
|
||||
Info.align = Align(16);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -3745,7 +3745,7 @@ bool NVPTXTargetLowering::getTgtMemIntrinsic(
|
|||
Info.ptrVal = I.getArgOperand(0);
|
||||
Info.offset = 0;
|
||||
Info.flags = MachineMemOperand::MOStore;
|
||||
Info.align = 8;
|
||||
Info.align = Align(8);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -3780,7 +3780,7 @@ bool NVPTXTargetLowering::getTgtMemIntrinsic(
|
|||
Info.ptrVal = I.getArgOperand(0);
|
||||
Info.offset = 0;
|
||||
Info.flags = MachineMemOperand::MOLoad | MachineMemOperand::MOStore;
|
||||
Info.align = 0;
|
||||
Info.align.reset();
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -3798,7 +3798,8 @@ bool NVPTXTargetLowering::getTgtMemIntrinsic(
|
|||
Info.ptrVal = I.getArgOperand(0);
|
||||
Info.offset = 0;
|
||||
Info.flags = MachineMemOperand::MOLoad;
|
||||
Info.align = cast<ConstantInt>(I.getArgOperand(1))->getZExtValue();
|
||||
Info.align =
|
||||
MaybeAlign(cast<ConstantInt>(I.getArgOperand(1))->getZExtValue());
|
||||
|
||||
return true;
|
||||
}
|
||||
|
@ -3817,7 +3818,8 @@ bool NVPTXTargetLowering::getTgtMemIntrinsic(
|
|||
Info.ptrVal = I.getArgOperand(0);
|
||||
Info.offset = 0;
|
||||
Info.flags = MachineMemOperand::MOLoad;
|
||||
Info.align = cast<ConstantInt>(I.getArgOperand(1))->getZExtValue();
|
||||
Info.align =
|
||||
MaybeAlign(cast<ConstantInt>(I.getArgOperand(1))->getZExtValue());
|
||||
|
||||
return true;
|
||||
}
|
||||
|
@ -3883,7 +3885,7 @@ bool NVPTXTargetLowering::getTgtMemIntrinsic(
|
|||
Info.ptrVal = nullptr;
|
||||
Info.offset = 0;
|
||||
Info.flags = MachineMemOperand::MOLoad;
|
||||
Info.align = 16;
|
||||
Info.align = Align(16);
|
||||
return true;
|
||||
|
||||
case Intrinsic::nvvm_tex_1d_v4s32_s32:
|
||||
|
@ -4003,7 +4005,7 @@ bool NVPTXTargetLowering::getTgtMemIntrinsic(
|
|||
Info.ptrVal = nullptr;
|
||||
Info.offset = 0;
|
||||
Info.flags = MachineMemOperand::MOLoad;
|
||||
Info.align = 16;
|
||||
Info.align = Align(16);
|
||||
return true;
|
||||
|
||||
case Intrinsic::nvvm_suld_1d_i8_clamp:
|
||||
|
@ -4056,7 +4058,7 @@ bool NVPTXTargetLowering::getTgtMemIntrinsic(
|
|||
Info.ptrVal = nullptr;
|
||||
Info.offset = 0;
|
||||
Info.flags = MachineMemOperand::MOLoad;
|
||||
Info.align = 16;
|
||||
Info.align = Align(16);
|
||||
return true;
|
||||
|
||||
case Intrinsic::nvvm_suld_1d_i16_clamp:
|
||||
|
@ -4109,7 +4111,7 @@ bool NVPTXTargetLowering::getTgtMemIntrinsic(
|
|||
Info.ptrVal = nullptr;
|
||||
Info.offset = 0;
|
||||
Info.flags = MachineMemOperand::MOLoad;
|
||||
Info.align = 16;
|
||||
Info.align = Align(16);
|
||||
return true;
|
||||
|
||||
case Intrinsic::nvvm_suld_1d_i32_clamp:
|
||||
|
@ -4162,7 +4164,7 @@ bool NVPTXTargetLowering::getTgtMemIntrinsic(
|
|||
Info.ptrVal = nullptr;
|
||||
Info.offset = 0;
|
||||
Info.flags = MachineMemOperand::MOLoad;
|
||||
Info.align = 16;
|
||||
Info.align = Align(16);
|
||||
return true;
|
||||
|
||||
case Intrinsic::nvvm_suld_1d_i64_clamp:
|
||||
|
@ -4200,7 +4202,7 @@ bool NVPTXTargetLowering::getTgtMemIntrinsic(
|
|||
Info.ptrVal = nullptr;
|
||||
Info.offset = 0;
|
||||
Info.flags = MachineMemOperand::MOLoad;
|
||||
Info.align = 16;
|
||||
Info.align = Align(16);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
|
|
@ -14489,7 +14489,7 @@ bool PPCTargetLowering::getTgtMemIntrinsic(IntrinsicInfo &Info,
|
|||
Info.ptrVal = I.getArgOperand(0);
|
||||
Info.offset = -VT.getStoreSize()+1;
|
||||
Info.size = 2*VT.getStoreSize()-1;
|
||||
Info.align = 1;
|
||||
Info.align = Align(1);
|
||||
Info.flags = MachineMemOperand::MOLoad;
|
||||
return true;
|
||||
}
|
||||
|
@ -14523,7 +14523,7 @@ bool PPCTargetLowering::getTgtMemIntrinsic(IntrinsicInfo &Info,
|
|||
Info.ptrVal = I.getArgOperand(0);
|
||||
Info.offset = 0;
|
||||
Info.size = VT.getStoreSize();
|
||||
Info.align = 1;
|
||||
Info.align = Align(1);
|
||||
Info.flags = MachineMemOperand::MOLoad;
|
||||
return true;
|
||||
}
|
||||
|
@ -14575,7 +14575,7 @@ bool PPCTargetLowering::getTgtMemIntrinsic(IntrinsicInfo &Info,
|
|||
Info.ptrVal = I.getArgOperand(1);
|
||||
Info.offset = -VT.getStoreSize()+1;
|
||||
Info.size = 2*VT.getStoreSize()-1;
|
||||
Info.align = 1;
|
||||
Info.align = Align(1);
|
||||
Info.flags = MachineMemOperand::MOStore;
|
||||
return true;
|
||||
}
|
||||
|
@ -14608,7 +14608,7 @@ bool PPCTargetLowering::getTgtMemIntrinsic(IntrinsicInfo &Info,
|
|||
Info.ptrVal = I.getArgOperand(1);
|
||||
Info.offset = 0;
|
||||
Info.size = VT.getStoreSize();
|
||||
Info.align = 1;
|
||||
Info.align = Align(1);
|
||||
Info.flags = MachineMemOperand::MOStore;
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -231,7 +231,7 @@ bool RISCVTargetLowering::getTgtMemIntrinsic(IntrinsicInfo &Info,
|
|||
Info.memVT = MVT::getVT(PtrTy->getElementType());
|
||||
Info.ptrVal = I.getArgOperand(0);
|
||||
Info.offset = 0;
|
||||
Info.align = 4;
|
||||
Info.align = Align(4);
|
||||
Info.flags = MachineMemOperand::MOLoad | MachineMemOperand::MOStore |
|
||||
MachineMemOperand::MOVolatile;
|
||||
return true;
|
||||
|
|
|
@ -569,7 +569,7 @@ bool WebAssemblyTargetLowering::getTgtMemIntrinsic(IntrinsicInfo &Info,
|
|||
Info.memVT = MVT::i32;
|
||||
Info.ptrVal = I.getArgOperand(0);
|
||||
Info.offset = 0;
|
||||
Info.align = 4;
|
||||
Info.align = Align(4);
|
||||
// atomic.notify instruction does not really load the memory specified with
|
||||
// this argument, but MachineMemOperand should either be load or store, so
|
||||
// we set this to a load.
|
||||
|
@ -583,7 +583,7 @@ bool WebAssemblyTargetLowering::getTgtMemIntrinsic(IntrinsicInfo &Info,
|
|||
Info.memVT = MVT::i32;
|
||||
Info.ptrVal = I.getArgOperand(0);
|
||||
Info.offset = 0;
|
||||
Info.align = 4;
|
||||
Info.align = Align(4);
|
||||
Info.flags = MachineMemOperand::MOVolatile | MachineMemOperand::MOLoad;
|
||||
return true;
|
||||
case Intrinsic::wasm_atomic_wait_i64:
|
||||
|
@ -591,7 +591,7 @@ bool WebAssemblyTargetLowering::getTgtMemIntrinsic(IntrinsicInfo &Info,
|
|||
Info.memVT = MVT::i64;
|
||||
Info.ptrVal = I.getArgOperand(0);
|
||||
Info.offset = 0;
|
||||
Info.align = 8;
|
||||
Info.align = Align(8);
|
||||
Info.flags = MachineMemOperand::MOVolatile | MachineMemOperand::MOLoad;
|
||||
return true;
|
||||
default:
|
||||
|
|
|
@ -4760,7 +4760,7 @@ bool X86TargetLowering::getTgtMemIntrinsic(IntrinsicInfo &Info,
|
|||
ScalarVT = MVT::i32;
|
||||
|
||||
Info.memVT = MVT::getVectorVT(ScalarVT, VT.getVectorNumElements());
|
||||
Info.align = 1;
|
||||
Info.align = Align(1);
|
||||
Info.flags |= MachineMemOperand::MOStore;
|
||||
break;
|
||||
}
|
||||
|
@ -4773,7 +4773,7 @@ bool X86TargetLowering::getTgtMemIntrinsic(IntrinsicInfo &Info,
|
|||
unsigned NumElts = std::min(DataVT.getVectorNumElements(),
|
||||
IndexVT.getVectorNumElements());
|
||||
Info.memVT = MVT::getVectorVT(DataVT.getVectorElementType(), NumElts);
|
||||
Info.align = 1;
|
||||
Info.align = Align(1);
|
||||
Info.flags |= MachineMemOperand::MOLoad;
|
||||
break;
|
||||
}
|
||||
|
@ -4785,7 +4785,7 @@ bool X86TargetLowering::getTgtMemIntrinsic(IntrinsicInfo &Info,
|
|||
unsigned NumElts = std::min(DataVT.getVectorNumElements(),
|
||||
IndexVT.getVectorNumElements());
|
||||
Info.memVT = MVT::getVectorVT(DataVT.getVectorElementType(), NumElts);
|
||||
Info.align = 1;
|
||||
Info.align = Align(1);
|
||||
Info.flags |= MachineMemOperand::MOStore;
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue