[llvm] r287106 - [X86][AVX512] Added some mask/maskz tests for sitofp/uitofp i32 to f64
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Wed Nov 16 06:24:04 PST 2016
Author: rksimon
Date: Wed Nov 16 08:24:04 2016
New Revision: 287106
URL: http://llvm.org/viewvc/llvm-project?rev=287106&view=rev
Log:
[X86][AVX512] Added some mask/maskz tests for sitofp/uitofp i32 to f64
Modified:
llvm/trunk/test/CodeGen/X86/avx512-cvt.ll
Modified: llvm/trunk/test/CodeGen/X86/avx512-cvt.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/avx512-cvt.ll?rev=287106&r1=287105&r2=287106&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/X86/avx512-cvt.ll (original)
+++ llvm/trunk/test/CodeGen/X86/avx512-cvt.ll Wed Nov 16 08:24:04 2016
@@ -350,6 +350,40 @@ define <8 x double> @sitof64(<8 x i32> %
%b = sitofp <8 x i32> %a to <8 x double>
ret <8 x double> %b
}
+define <8 x double> @sitof64_mask(<8 x double> %a, <8 x i32> %b, i8 %c) nounwind {
+; KNL-LABEL: sitof64_mask:
+; KNL: ## BB#0:
+; KNL-NEXT: kmovw %edi, %k1
+; KNL-NEXT: vcvtdq2pd %ymm1, %zmm0 {%k1}
+; KNL-NEXT: retq
+;
+; SKX-LABEL: sitof64_mask:
+; SKX: ## BB#0:
+; SKX-NEXT: kmovb %edi, %k1
+; SKX-NEXT: vcvtdq2pd %ymm1, %zmm0 {%k1}
+; SKX-NEXT: retq
+ %1 = bitcast i8 %c to <8 x i1>
+ %2 = sitofp <8 x i32> %b to <8 x double>
+ %3 = select <8 x i1> %1, <8 x double> %2, <8 x double> %a
+ ret <8 x double> %3
+}
+define <8 x double> @sitof64_maskz(<8 x i32> %a, i8 %b) nounwind {
+; KNL-LABEL: sitof64_maskz:
+; KNL: ## BB#0:
+; KNL-NEXT: kmovw %edi, %k1
+; KNL-NEXT: vcvtdq2pd %ymm0, %zmm0 {%k1} {z}
+; KNL-NEXT: retq
+;
+; SKX-LABEL: sitof64_maskz:
+; SKX: ## BB#0:
+; SKX-NEXT: kmovb %edi, %k1
+; SKX-NEXT: vcvtdq2pd %ymm0, %zmm0 {%k1} {z}
+; SKX-NEXT: retq
+ %1 = bitcast i8 %b to <8 x i1>
+ %2 = sitofp <8 x i32> %a to <8 x double>
+ %3 = select <8 x i1> %1, <8 x double> %2, <8 x double> zeroinitializer
+ ret <8 x double> %3
+}
define <8 x i32> @fptosi01(<8 x double> %a) {
; ALL-LABEL: fptosi01:
@@ -575,6 +609,40 @@ define <16 x double> @uitof64(<16 x i32>
%b = uitofp <16 x i32> %a to <16 x double>
ret <16 x double> %b
}
+define <8 x double> @uitof64_mask(<8 x double> %a, <8 x i32> %b, i8 %c) nounwind {
+; KNL-LABEL: uitof64_mask:
+; KNL: ## BB#0:
+; KNL-NEXT: kmovw %edi, %k1
+; KNL-NEXT: vcvtudq2pd %ymm1, %zmm0 {%k1}
+; KNL-NEXT: retq
+;
+; SKX-LABEL: uitof64_mask:
+; SKX: ## BB#0:
+; SKX-NEXT: kmovb %edi, %k1
+; SKX-NEXT: vcvtudq2pd %ymm1, %zmm0 {%k1}
+; SKX-NEXT: retq
+ %1 = bitcast i8 %c to <8 x i1>
+ %2 = uitofp <8 x i32> %b to <8 x double>
+ %3 = select <8 x i1> %1, <8 x double> %2, <8 x double> %a
+ ret <8 x double> %3
+}
+define <8 x double> @uitof64_maskz(<8 x i32> %a, i8 %b) nounwind {
+; KNL-LABEL: uitof64_maskz:
+; KNL: ## BB#0:
+; KNL-NEXT: kmovw %edi, %k1
+; KNL-NEXT: vcvtudq2pd %ymm0, %zmm0 {%k1} {z}
+; KNL-NEXT: retq
+;
+; SKX-LABEL: uitof64_maskz:
+; SKX: ## BB#0:
+; SKX-NEXT: kmovb %edi, %k1
+; SKX-NEXT: vcvtudq2pd %ymm0, %zmm0 {%k1} {z}
+; SKX-NEXT: retq
+ %1 = bitcast i8 %b to <8 x i1>
+ %2 = uitofp <8 x i32> %a to <8 x double>
+ %3 = select <8 x i1> %1, <8 x double> %2, <8 x double> zeroinitializer
+ ret <8 x double> %3
+}
define <4 x double> @uitof64_256(<4 x i32> %a) nounwind {
; KNL-LABEL: uitof64_256:
More information about the llvm-commits
mailing list