summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen/X86/fma-fneg-combine.ll
diff options
context:
space:
mode:
authorCraig Topper <craig.topper@gmail.com>2017-03-29 06:55:28 +0000
committerCraig Topper <craig.topper@gmail.com>2017-03-29 06:55:28 +0000
commitd284606327a58fd4684a63b126079938ff4513cc (patch)
treeb95dbfdbe21b923ee8805237ec26b8baec7fed2f /llvm/test/CodeGen/X86/fma-fneg-combine.ll
parent60c24878748987d193c91a863a3dc822ee664afc (diff)
downloadbcm5719-llvm-d284606327a58fd4684a63b126079938ff4513cc.tar.gz
bcm5719-llvm-d284606327a58fd4684a63b126079938ff4513cc.zip
[AVX-512] Remove explicit KMOVWrk/KMOVWKr instructions from patterns where we can just use COPY_TO_REGCLASS instead.
This will result in a KMOVW or KMOVD being emitted during register allocation. And in at least some cases this might allow the register coalescer to remove the copy all together. llvm-svn: 298984
Diffstat (limited to 'llvm/test/CodeGen/X86/fma-fneg-combine.ll')
-rw-r--r--llvm/test/CodeGen/X86/fma-fneg-combine.ll24
1 files changed, 16 insertions, 8 deletions
diff --git a/llvm/test/CodeGen/X86/fma-fneg-combine.ll b/llvm/test/CodeGen/X86/fma-fneg-combine.ll
index 6cdb3c3d6c6..bb332f7282a 100644
--- a/llvm/test/CodeGen/X86/fma-fneg-combine.ll
+++ b/llvm/test/CodeGen/X86/fma-fneg-combine.ll
@@ -142,7 +142,7 @@ define <4 x float> @test11(<4 x float> %a, <4 x float> %b, <4 x float> %c, i8 ze
; SKX: # BB#0: # %entry
; SKX-NEXT: vxorps {{.*}}(%rip){1to4}, %xmm2, %xmm0
; SKX-NEXT: andl $1, %edi
-; SKX-NEXT: kmovw %edi, %k1
+; SKX-NEXT: kmovd %edi, %k1
; SKX-NEXT: vfmadd231ss %xmm1, %xmm1, %xmm0 {%k1}
; SKX-NEXT: retq
;
@@ -183,13 +183,21 @@ entry:
}
define <2 x double> @test13(<2 x double> %a, <2 x double> %b, <2 x double> %c, i8 %mask) {
-; CHECK-LABEL: test13:
-; CHECK: # BB#0: # %entry
-; CHECK-NEXT: vxorpd {{.*}}(%rip), %xmm0, %xmm0
-; CHECK-NEXT: andl $1, %edi
-; CHECK-NEXT: kmovw %edi, %k1
-; CHECK-NEXT: vfmadd213sd %xmm2, %xmm1, %xmm0 {%k1}
-; CHECK-NEXT: retq
+; SKX-LABEL: test13:
+; SKX: # BB#0: # %entry
+; SKX-NEXT: vxorpd {{.*}}(%rip), %xmm0, %xmm0
+; SKX-NEXT: andl $1, %edi
+; SKX-NEXT: kmovd %edi, %k1
+; SKX-NEXT: vfmadd213sd %xmm2, %xmm1, %xmm0 {%k1}
+; SKX-NEXT: retq
+;
+; KNL-LABEL: test13:
+; KNL: # BB#0: # %entry
+; KNL-NEXT: vxorpd {{.*}}(%rip), %xmm0, %xmm0
+; KNL-NEXT: andl $1, %edi
+; KNL-NEXT: kmovw %edi, %k1
+; KNL-NEXT: vfmadd213sd %xmm2, %xmm1, %xmm0 {%k1}
+; KNL-NEXT: retq
entry:
%sub.i = fsub <2 x double> <double -0.000000e+00, double -0.000000e+00>, %a
%0 = tail call <2 x double> @llvm.x86.avx512.mask.vfmadd.sd(<2 x double> %sub.i, <2 x double> %b, <2 x double> %c, i8 %mask, i32 4)
OpenPOWER on IntegriCloud