Skip to content

Commit

Permalink
[X86][AVX512] Added some mask/maskz tests for sitofp/uitofp i32 to f64
Browse files Browse the repository at this point in the history
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@287106 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
RKSimon committed Nov 16, 2016
1 parent e068e25 commit dc01a45
Showing 1 changed file with 68 additions and 0 deletions.
68 changes: 68 additions & 0 deletions test/CodeGen/X86/avx512-cvt.ll
Original file line number Diff line number Diff line change
Expand Up @@ -350,6 +350,40 @@ define <8 x double> @sitof64(<8 x i32> %a) {
%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:
Expand Down Expand Up @@ -575,6 +609,40 @@ define <16 x double> @uitof64(<16 x i32> %a) nounwind {
%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:
Expand Down

0 comments on commit dc01a45

Please sign in to comment.