From: Craig Topper Date: Tue, 28 Nov 2017 22:08:51 +0000 (+0000) Subject: [X86] Remove code from combineUIntToFP that tried to favor UINT_TO_FP if legal when... X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=45174c1e734bb35d84b04ef32c4092073663563c;p=llvm [X86] Remove code from combineUIntToFP that tried to favor UINT_TO_FP if legal when zero extending from vXi8/vX816. The UINT_TO_FP is immediately converted to SINT_TO_FP when the node is re-evaluated because we'll detect that the sign bit is zero. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319234 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Target/X86/X86ISelLowering.cpp b/lib/Target/X86/X86ISelLowering.cpp index 50e9f643747..9cbe8546ef2 100644 --- a/lib/Target/X86/X86ISelLowering.cpp +++ b/lib/Target/X86/X86ISelLowering.cpp @@ -36071,9 +36071,7 @@ static SDValue combineUIntToFP(SDNode *N, SelectionDAG &DAG, InVT.getVectorNumElements()); SDValue P = DAG.getNode(ISD::ZERO_EXTEND, dl, DstVT, Op0); - if (TLI.isOperationLegal(ISD::UINT_TO_FP, DstVT)) - return DAG.getNode(ISD::UINT_TO_FP, dl, VT, P); - + // UINT_TO_FP isn't legal without AVX512 so use SINT_TO_FP. return DAG.getNode(ISD::SINT_TO_FP, dl, VT, P); }