[PATCH] D54703: [TargetLowering] expandFP_TO_UINT - improve fp16 support

Simon Atanasyan via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 19 10:41:37 PST 2018


atanasyan accepted this revision.
atanasyan added a comment.
This revision is now accepted and ready to land.

LGTM



================
Comment at: lib/CodeGen/SelectionDAG/TargetLowering.cpp:4172
   // False = 0x8000000000000000 + fp_to_sint(Src - 0x8000000000000000)
-  // Result = select (Src < 0x8000000000000000), True, False
-  APFloat apf(DAG.EVTToAPFloatSemantics(SrcVT),
-              APInt::getNullValue(SrcVT.getScalarSizeInBits()));
-  APInt x = APInt::getSignMask(DstVT.getScalarSizeInBits());
-  (void)apf.convertFromAPInt(x, false, APFloat::rmNearestTiesToEven);
+// Result = select (Src < 0x8000000000000000), True, False
+  SDValue Cst = DAG.getConstantFP(APF, dl, SrcVT);
----------------
Indentation?


Repository:
  rL LLVM

https://reviews.llvm.org/D54703





More information about the llvm-commits mailing list