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,28 @@ : 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; + } }; } // namespace llvm