diff --git a/llvm/lib/Target/VE/VETargetTransformInfo.h b/llvm/lib/Target/VE/VETargetTransformInfo.h --- a/llvm/lib/Target/VE/VETargetTransformInfo.h +++ b/llvm/lib/Target/VE/VETargetTransformInfo.h @@ -38,11 +38,45 @@ : BaseT(TM, F.getParent()->getDataLayout()), ST(TM->getSubtargetImpl(F)), TLI(ST->getTargetLowering()) {} - unsigned getNumberOfRegisters(unsigned ClassID) const { return 64; } + unsigned getNumberOfRegisters(unsigned ClassID) const { + bool VectorRegs = (ClassID == 1); + if (VectorRegs) { + // TODO report vregs once vector isel is stable. + return 0; + } - unsigned getRegisterBitWidth(bool Vector) const { return 64; } + return 64; + } - unsigned getMinVectorRegisterBitWidth() const { return 64; } + unsigned getRegisterBitWidth(bool Vector) const { + if (Vector) { + // TODO report vregs once vector isel is stable. + return 0; + } + return 64; + } + + unsigned getMinVectorRegisterBitWidth() const { + // TODO report vregs once vector isel is stable. + return 0; + } + + /// Load & Store { + bool isLegalMaskedLoad(Type *DataType, MaybeAlign Alignment) { return false; } + bool isLegalMaskedStore(Type *DataType, MaybeAlign Alignment) { + return false; + } + bool isLegalMaskedGather(Type *DataType, MaybeAlign Alignment) { + return false; + }; + bool isLegalMaskedScatter(Type *DataType, MaybeAlign Alignment) { + return false; + } + /// } Load & Store + + /// Reductions { + bool shouldExpandReduction(const IntrinsicInst *II) const { return true; } + /// } Reductions }; } // namespace llvm