summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--llvm/lib/Target/ARM/ARMTargetTransformInfo.h5
-rw-r--r--llvm/test/Transforms/LoopVectorize/ARM/arm-ieee-vectorize.ll22
2 files changed, 12 insertions, 15 deletions
diff --git a/llvm/lib/Target/ARM/ARMTargetTransformInfo.h b/llvm/lib/Target/ARM/ARMTargetTransformInfo.h
index e07174eb40b..76b3f58de65 100644
--- a/llvm/lib/Target/ARM/ARMTargetTransformInfo.h
+++ b/llvm/lib/Target/ARM/ARMTargetTransformInfo.h
@@ -54,8 +54,11 @@ public:
bool enableInterleavedAccessVectorization() { return true; }
+ /// 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.
bool isFPVectorizationPotentiallyUnsafe() {
- return !ST->hasFPARMv8() && !ST->isTargetDarwin();
+ return !ST->isTargetDarwin();
}
/// \name Scalar TTI Implementations
diff --git a/llvm/test/Transforms/LoopVectorize/ARM/arm-ieee-vectorize.ll b/llvm/test/Transforms/LoopVectorize/ARM/arm-ieee-vectorize.ll
index 1a0b5b4136d..369568f6dfa 100644
--- a/llvm/test/Transforms/LoopVectorize/ARM/arm-ieee-vectorize.ll
+++ b/llvm/test/Transforms/LoopVectorize/ARM/arm-ieee-vectorize.ll
@@ -1,5 +1,5 @@
-; RUN: opt -mtriple armv7-linux-gnueabihf -loop-vectorize -S %s -debug-only=loop-vectorize -o /dev/null 2>&1 | FileCheck %s --check-prefix=CHECK --check-prefix=LINUX-V7
-; RUN: opt -mtriple armv8-linux-gnu -loop-vectorize -S %s -debug-only=loop-vectorize -o /dev/null 2>&1 | FileCheck %s --check-prefix=CHECK --check-prefix=LINUX-V8
+; RUN: opt -mtriple armv7-linux-gnueabihf -loop-vectorize -S %s -debug-only=loop-vectorize -o /dev/null 2>&1 | FileCheck %s --check-prefix=CHECK --check-prefix=LINUX
+; RUN: opt -mtriple armv8-linux-gnu -loop-vectorize -S %s -debug-only=loop-vectorize -o /dev/null 2>&1 | FileCheck %s --check-prefix=CHECK --check-prefix=LINUX
; RUN: opt -mtriple armv7-unknwon-darwin -loop-vectorize -S %s -debug-only=loop-vectorize -o /dev/null 2>&1 | FileCheck %s --check-prefix=CHECK --check-prefix=DARWIN
; REQUIRES: asserts
@@ -42,10 +42,8 @@ for.end: ; preds = %for.end.loopexit, %
}
; Floating-point loops need fast-math to be vectorizeable
-; LINUX-V7: Checking a loop in "sumf"
-; LINUX-V7: Potentially unsafe FP op prevents vectorization
-; LINUX-V8: Checking a loop in "sumf"
-; LINUX-V8: We can vectorize this loop!
+; LINUX: Checking a loop in "sumf"
+; LINUX: Potentially unsafe FP op prevents vectorization
; DARWIN: Checking a loop in "sumf"
; DARWIN: We can vectorize this loop!
define void @sumf(float* noalias nocapture readonly %A, float* noalias nocapture readonly %B, float* noalias nocapture %C, i32 %N) {
@@ -110,10 +108,8 @@ for.end: ; preds = %for.end.loopexit, %
}
; Floating-point loops need fast-math to be vectorizeable
-; LINUX-V7: Checking a loop in "redf"
-; LINUX-V7: Potentially unsafe FP op prevents vectorization
-; LINUX-V8: Checking a loop in "redf"
-; LINUX-V8: We can vectorize this loop!
+; LINUX: Checking a loop in "redf"
+; LINUX: Potentially unsafe FP op prevents vectorization
; DARWIN: Checking a loop in "redf"
; DARWIN: We can vectorize this loop!
define float @redf(float* noalias nocapture readonly %a, float* noalias nocapture readonly %b, i32 %N) {
@@ -147,10 +143,8 @@ for.end: ; preds = %for.end.loopexit, %
}
; Make sure calls that turn into builtins are also covered
-; LINUX-V7: Checking a loop in "fabs"
-; LINUX-V7: Potentially unsafe FP op prevents vectorization
-; LINUX-V8: Checking a loop in "fabs"
-; LINUX-V8: We can vectorize this loop!
+; LINUX: Checking a loop in "fabs"
+; LINUX: Potentially unsafe FP op prevents vectorization
; DARWIN: Checking a loop in "fabs"
; DARWIN: We can vectorize this loop!
define void @fabs(float* noalias nocapture readonly %A, float* noalias nocapture readonly %B, float* noalias nocapture %C, i32 %N) {
OpenPOWER on IntegriCloud