[llvm] r319640 - [X86] Don't turn UINT_TO_FP into SINT_TO_FP during lowering.
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Sun Dec 3 21:38:44 PST 2017
Author: ctopper
Date: Sun Dec 3 21:38:44 2017
New Revision: 319640
URL: http://llvm.org/viewvc/llvm-project?rev=319640&view=rev
Log:
[X86] Don't turn UINT_TO_FP into SINT_TO_FP during lowering.
We already do this as a DAG combine. The version during lowering can only trigger if known bits changes something that improves known bits analysis. But this means we should be improving known bits analysis to work on the unlowered form instead.
Modified:
llvm/trunk/lib/Target/X86/X86ISelLowering.cpp
Modified: llvm/trunk/lib/Target/X86/X86ISelLowering.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86ISelLowering.cpp?rev=319640&r1=319639&r2=319640&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86ISelLowering.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86ISelLowering.cpp Sun Dec 3 21:38:44 2017
@@ -15820,12 +15820,6 @@ SDValue X86TargetLowering::LowerUINT_TO_
SDLoc dl(Op);
auto PtrVT = getPointerTy(DAG.getDataLayout());
- // Since UINT_TO_FP is legal (it's marked custom), dag combiner won't
- // optimize it to a SINT_TO_FP when the sign bit is known zero. Perform
- // the optimization here.
- if (DAG.SignBitIsZero(N0))
- return DAG.getNode(ISD::SINT_TO_FP, dl, Op.getValueType(), N0);
-
if (Op.getSimpleValueType().isVector())
return lowerUINT_TO_FP_vec(Op, DAG);
More information about the llvm-commits
mailing list