mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-11-02 07:11:49 +00:00
AVX-512: fixed UINT_TO_FP operation for 512-bit types.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@236955 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
a0adcdb9ce
commit
c7c44fa75e
@ -1301,6 +1301,8 @@ X86TargetLowering::X86TargetLowering(const X86TargetMachine &TM,
|
||||
setOperationAction(ISD::UINT_TO_FP, MVT::v16i32, Legal);
|
||||
setOperationAction(ISD::UINT_TO_FP, MVT::v8i32, Legal);
|
||||
setOperationAction(ISD::UINT_TO_FP, MVT::v4i32, Legal);
|
||||
setOperationAction(ISD::UINT_TO_FP, MVT::v16i8, Custom);
|
||||
setOperationAction(ISD::UINT_TO_FP, MVT::v16i16, Custom);
|
||||
setOperationAction(ISD::FP_ROUND, MVT::v8f32, Legal);
|
||||
setOperationAction(ISD::FP_EXTEND, MVT::v8f32, Legal);
|
||||
|
||||
@ -11793,6 +11795,11 @@ SDValue X86TargetLowering::lowerUINT_TO_FP_vec(SDValue Op,
|
||||
case MVT::v4i32:
|
||||
case MVT::v8i32:
|
||||
return lowerUINT_TO_FP_vXi32(Op, DAG, *Subtarget);
|
||||
case MVT::v16i8:
|
||||
case MVT::v16i16:
|
||||
if (Subtarget->hasAVX512())
|
||||
return DAG.getNode(ISD::UINT_TO_FP, dl, Op.getValueType(),
|
||||
DAG.getNode(ISD::ZERO_EXTEND, dl, MVT::v16i32, N0));
|
||||
}
|
||||
llvm_unreachable(nullptr);
|
||||
}
|
||||
|
@ -308,3 +308,20 @@ define <8 x double> @sitofp_8i1_double(<8 x double> %a) {
|
||||
%1 = sitofp <8 x i1> %cmpres to <8 x double>
|
||||
ret <8 x double> %1
|
||||
}
|
||||
|
||||
; CHECK-LABEL: @uitofp_16i8
|
||||
; CHECK: vpmovzxbd
|
||||
; CHECK: vcvtudq2ps
|
||||
define <16 x float> @uitofp_16i8(<16 x i8>%a) {
|
||||
%b = uitofp <16 x i8> %a to <16 x float>
|
||||
ret <16 x float>%b
|
||||
}
|
||||
|
||||
; CHECK-LABEL: @uitofp_16i16
|
||||
; CHECK: vpmovzxwd
|
||||
; CHECK: vcvtudq2ps
|
||||
define <16 x float> @uitofp_16i16(<16 x i16>%a) {
|
||||
%b = uitofp <16 x i16> %a to <16 x float>
|
||||
ret <16 x float>%b
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user