]> granicus.if.org Git - llvm/commitdiff
[X86] Remove code from combineUIntToFP that tried to favor UINT_TO_FP if legal when...
authorCraig Topper <craig.topper@intel.com>
Tue, 28 Nov 2017 22:08:51 +0000 (22:08 +0000)
committerCraig Topper <craig.topper@intel.com>
Tue, 28 Nov 2017 22:08:51 +0000 (22:08 +0000)
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

lib/Target/X86/X86ISelLowering.cpp

index 50e9f6437476654565dc171513f149432b4037dc..9cbe8546ef2a56df972308c42b6bc6fac8d0432b 100644 (file)
@@ -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);
   }