summaryrefslogtreecommitdiffstats
path: root/llvm/test/Transforms/LoopVectorize
diff options
context:
space:
mode:
authorCraig Topper <craig.topper@intel.com>2019-05-30 18:19:35 +0000
committerCraig Topper <craig.topper@intel.com>2019-05-30 18:19:35 +0000
commit778e445c58c52d5b23aafe89855b93a00eac46e5 (patch)
treeca0465f549ca038aaa1e7d654ec55d8829b4f407 /llvm/test/Transforms/LoopVectorize
parent5d5f6299229610d69c596a08d1d9344a1c47531c (diff)
downloadbcm5719-llvm-778e445c58c52d5b23aafe89855b93a00eac46e5.tar.gz
bcm5719-llvm-778e445c58c52d5b23aafe89855b93a00eac46e5.zip
[LoopVectorize] Add FNeg instruction support
Differential Revision: https://reviews.llvm.org/D62510 llvm-svn: 362124
Diffstat (limited to 'llvm/test/Transforms/LoopVectorize')
-rw-r--r--llvm/test/Transforms/LoopVectorize/X86/fneg-cost.ll6
-rw-r--r--llvm/test/Transforms/LoopVectorize/fneg.ll15
2 files changed, 5 insertions, 16 deletions
diff --git a/llvm/test/Transforms/LoopVectorize/X86/fneg-cost.ll b/llvm/test/Transforms/LoopVectorize/X86/fneg-cost.ll
index 65898716742..5aedf451ed2 100644
--- a/llvm/test/Transforms/LoopVectorize/X86/fneg-cost.ll
+++ b/llvm/test/Transforms/LoopVectorize/X86/fneg-cost.ll
@@ -5,9 +5,9 @@
target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64-S128"
target triple = "x86_64-apple-macosx10.8.0"
-; CHECK: Found an estimated cost of 2 for VF 1 For instruction: %neg = fneg float %{{.*}}
-; CHECK: Found an estimated cost of 6 for VF 2 For instruction: %neg = fneg float %{{.*}}
-; CHECK: Found an estimated cost of 14 for VF 4 For instruction: %neg = fneg float %{{.*}}
+; CHECK: Found an estimated cost of 4 for VF 1 For instruction: %neg = fneg float %{{.*}}
+; CHECK: Found an estimated cost of 4 for VF 2 For instruction: %neg = fneg float %{{.*}}
+; CHECK: Found an estimated cost of 4 for VF 4 For instruction: %neg = fneg float %{{.*}}
define void @fneg_cost(float* %a, i64 %n) {
entry:
br label %for.body
diff --git a/llvm/test/Transforms/LoopVectorize/fneg.ll b/llvm/test/Transforms/LoopVectorize/fneg.ll
index 8e5e2aae9fd..103e795b211 100644
--- a/llvm/test/Transforms/LoopVectorize/fneg.ll
+++ b/llvm/test/Transforms/LoopVectorize/fneg.ll
@@ -3,19 +3,8 @@
define void @foo(float* %a, i64 %n) {
; CHECK: vector.body:
; CHECK: [[WIDE_LOAD:%.*]] = load <4 x float>, <4 x float>* {{.*}}, align 4
-; CHECK-NEXT: [[TMP4:%.*]] = extractelement <4 x float> [[WIDE_LOAD]], i32 0
-; CHECK-NEXT: [[TMP5:%.*]] = fneg float [[TMP4]]
-; CHECK-NEXT: [[TMP6:%.*]] = extractelement <4 x float> [[WIDE_LOAD]], i32 1
-; CHECK-NEXT: [[TMP7:%.*]] = fneg float [[TMP6]]
-; CHECK-NEXT: [[TMP8:%.*]] = extractelement <4 x float> [[WIDE_LOAD]], i32 2
-; CHECK-NEXT: [[TMP9:%.*]] = fneg float [[TMP8]]
-; CHECK-NEXT: [[TMP10:%.*]] = extractelement <4 x float> [[WIDE_LOAD]], i32 3
-; CHECK-NEXT: [[TMP11:%.*]] = fneg float [[TMP10]]
-; CHECK-NEXT: [[TMP12:%.*]] = insertelement <4 x float> undef, float [[TMP5]], i32 0
-; CHECK-NEXT: [[TMP13:%.*]] = insertelement <4 x float> [[TMP12]], float [[TMP7]], i32 1
-; CHECK-NEXT: [[TMP14:%.*]] = insertelement <4 x float> [[TMP13]], float [[TMP9]], i32 2
-; CHECK-NEXT: [[TMP15:%.*]] = insertelement <4 x float> [[TMP14]], float [[TMP11]], i32 3
-; CHECK: store <4 x float> [[TMP15]], <4 x float>* {{.*}}, align 4
+; CHECK-NEXT: [[TMP4:%.*]] = fneg <4 x float> [[WIDE_LOAD]]
+; CHECK: store <4 x float> [[TMP4]], <4 x float>* {{.*}}, align 4
;
entry:
br label %for.body
OpenPOWER on IntegriCloud