Skip to content

Commit 0bec7f3

Browse files
committed
[X86] Remove custom lowering for uint_to_fp from vXi8/vXi16.
We have a DAG combine that uses a zero extend that should prevent this from ever occurring now. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319233 91177308-0d34-0410-b5e6-96231b3b80d8
1 parent 7f3e660 commit 0bec7f3

File tree

1 file changed

+1
-20
lines changed

1 file changed

+1
-20
lines changed

lib/Target/X86/X86ISelLowering.cpp

+1-20
Original file line numberDiff line numberDiff line change
@@ -860,8 +860,6 @@ X86TargetLowering::X86TargetLowering(const X86TargetMachine &TM,
860860
setOperationAction(ISD::SINT_TO_FP, MVT::v4i32, Legal);
861861
setOperationAction(ISD::SINT_TO_FP, MVT::v2i32, Custom);
862862

863-
setOperationAction(ISD::UINT_TO_FP, MVT::v4i8, Custom);
864-
setOperationAction(ISD::UINT_TO_FP, MVT::v4i16, Custom);
865863
setOperationAction(ISD::UINT_TO_FP, MVT::v2i32, Custom);
866864

867865
// Fast v2f32 UINT_TO_FP( v2i32 ) custom conversion.
@@ -1006,9 +1004,6 @@ X86TargetLowering::X86TargetLowering(const X86TargetMachine &TM,
10061004
setOperationAction(ISD::SINT_TO_FP, MVT::v8i32, Legal);
10071005
setOperationAction(ISD::FP_ROUND, MVT::v4f32, Legal);
10081006

1009-
setOperationAction(ISD::UINT_TO_FP, MVT::v8i8, Custom);
1010-
setOperationAction(ISD::UINT_TO_FP, MVT::v8i16, Custom);
1011-
10121007
for (MVT VT : MVT::fp_vector_valuetypes())
10131008
setLoadExtAction(ISD::EXTLOAD, VT, MVT::v4f32, Legal);
10141009

@@ -1190,8 +1185,6 @@ X86TargetLowering::X86TargetLowering(const X86TargetMachine &TM,
11901185
setOperationAction(ISD::UINT_TO_FP, MVT::v16i32, Legal);
11911186
setOperationAction(ISD::UINT_TO_FP, MVT::v8i32, Legal);
11921187
setOperationAction(ISD::UINT_TO_FP, MVT::v4i32, Legal);
1193-
setOperationAction(ISD::UINT_TO_FP, MVT::v16i8, Custom);
1194-
setOperationAction(ISD::UINT_TO_FP, MVT::v16i16, Custom);
11951188
setOperationAction(ISD::SINT_TO_FP, MVT::v16i1, Custom);
11961189
setOperationAction(ISD::UINT_TO_FP, MVT::v16i1, Custom);
11971190
setOperationAction(ISD::SINT_TO_FP, MVT::v8i1, Custom);
@@ -15801,24 +15794,12 @@ SDValue X86TargetLowering::lowerUINT_TO_FP_vec(SDValue Op,
1580115794
switch (SrcVT.SimpleTy) {
1580215795
default:
1580315796
llvm_unreachable("Custom UINT_TO_FP is not supported!");
15804-
case MVT::v4i8:
15805-
case MVT::v4i16:
15806-
case MVT::v8i8:
15807-
case MVT::v8i16: {
15808-
MVT NVT = MVT::getVectorVT(MVT::i32, SrcVT.getVectorNumElements());
15809-
return DAG.getNode(ISD::SINT_TO_FP, dl, Op.getValueType(),
15810-
DAG.getNode(ISD::ZERO_EXTEND, dl, NVT, N0));
15811-
}
1581215797
case MVT::v2i32:
1581315798
return lowerUINT_TO_FP_v2i32(Op, DAG, Subtarget, dl);
1581415799
case MVT::v4i32:
1581515800
case MVT::v8i32:
15801+
assert(!Subtarget.hasAVX512());
1581615802
return lowerUINT_TO_FP_vXi32(Op, DAG, Subtarget);
15817-
case MVT::v16i8:
15818-
case MVT::v16i16:
15819-
assert(Subtarget.hasAVX512());
15820-
return DAG.getNode(ISD::UINT_TO_FP, dl, Op.getValueType(),
15821-
DAG.getNode(ISD::ZERO_EXTEND, dl, MVT::v16i32, N0));
1582215803
}
1582315804
}
1582415805

0 commit comments

Comments
 (0)