aboutsummaryrefslogtreecommitdiff
path: root/lib/Target/ARM/ARMTargetTransformInfo.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Target/ARM/ARMTargetTransformInfo.h')
-rw-r--r--lib/Target/ARM/ARMTargetTransformInfo.h24
1 files changed, 21 insertions, 3 deletions
diff --git a/lib/Target/ARM/ARMTargetTransformInfo.h b/lib/Target/ARM/ARMTargetTransformInfo.h
index 52f6ea4a6e2f..a878fdcfe3c7 100644
--- a/lib/Target/ARM/ARMTargetTransformInfo.h
+++ b/lib/Target/ARM/ARMTargetTransformInfo.h
@@ -101,9 +101,9 @@ public:
/// Floating-point computation using ARMv8 AArch32 Advanced
/// SIMD instructions remains unchanged from ARMv7. Only AArch64 SIMD
- /// is IEEE-754 compliant, but it's not covered in this target.
+ /// and Arm MVE are IEEE-754 compliant.
bool isFPVectorizationPotentiallyUnsafe() {
- return !ST->isTargetDarwin();
+ return !ST->isTargetDarwin() && !ST->hasMVEFloatOps();
}
/// \name Scalar TTI Implementations
@@ -122,10 +122,13 @@ public:
/// \name Vector TTI Implementations
/// @{
- unsigned getNumberOfRegisters(bool Vector) {
+ unsigned getNumberOfRegisters(unsigned ClassID) const {
+ bool Vector = (ClassID == 1);
if (Vector) {
if (ST->hasNEON())
return 16;
+ if (ST->hasMVEIntegerOps())
+ return 8;
return 0;
}
@@ -138,6 +141,8 @@ public:
if (Vector) {
if (ST->hasNEON())
return 128;
+ if (ST->hasMVEIntegerOps())
+ return 128;
return 0;
}
@@ -148,10 +153,23 @@ public:
return ST->getMaxInterleaveFactor();
}
+ bool isLegalMaskedLoad(Type *DataTy, MaybeAlign Alignment);
+
+ bool isLegalMaskedStore(Type *DataTy, MaybeAlign Alignment) {
+ return isLegalMaskedLoad(DataTy, Alignment);
+ }
+
int getMemcpyCost(const Instruction *I);
int getShuffleCost(TTI::ShuffleKind Kind, Type *Tp, int Index, Type *SubTp);
+ bool useReductionIntrinsic(unsigned Opcode, Type *Ty,
+ TTI::ReductionFlags Flags) const;
+
+ bool shouldExpandReduction(const IntrinsicInst *II) const {
+ return false;
+ }
+
int getCastInstrCost(unsigned Opcode, Type *Dst, Type *Src,
const Instruction *I = nullptr);