summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/ARM
diff options
context:
space:
mode:
authorDavid Green <david.green@arm.com>2019-08-11 08:42:57 +0000
committerDavid Green <david.green@arm.com>2019-08-11 08:42:57 +0000
commit44f8d635e20429365782b831ef59ee0903982d02 (patch)
tree97702b6b050efa90f8b973201fad7b28bc6710df /llvm/lib/Target/ARM
parent3560ed052354940756e87a3372be819b765b3c45 (diff)
downloadbcm5719-llvm-44f8d635e20429365782b831ef59ee0903982d02.tar.gz
bcm5719-llvm-44f8d635e20429365782b831ef59ee0903982d02.zip
[ARM] Permit auto-vectorization using MVE
With enough codegen complete, we can now correctly report the number and size of vector registers for MVE, allowing auto vectorisation. This also allows FP auto-vectorization for MVE without -Ofast/-ffast-math, due to support for IEEE FP arithmetic and parity between scalar and vector FP behaviour. Patch by David Sherwood. Differential Revision: https://reviews.llvm.org/D63728 llvm-svn: 368529
Diffstat (limited to 'llvm/lib/Target/ARM')
-rw-r--r--llvm/lib/Target/ARM/ARMTargetTransformInfo.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/llvm/lib/Target/ARM/ARMTargetTransformInfo.h b/llvm/lib/Target/ARM/ARMTargetTransformInfo.h
index 52f6ea4a6e2..b966c76c7bf 100644
--- a/llvm/lib/Target/ARM/ARMTargetTransformInfo.h
+++ b/llvm/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
@@ -126,6 +126,8 @@ public:
if (Vector) {
if (ST->hasNEON())
return 16;
+ if (ST->hasMVEIntegerOps())
+ return 8;
return 0;
}
@@ -138,6 +140,8 @@ public:
if (Vector) {
if (ST->hasNEON())
return 128;
+ if (ST->hasMVEIntegerOps())
+ return 128;
return 0;
}
OpenPOWER on IntegriCloud