[PATCH] D110312: [X86][ISel] Lowering FROUND(f16) and FROUNDEVEN(f16)

Freddy, Ye via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Sep 26 01:34:49 PDT 2021


FreddyYe added inline comments.


================
Comment at: llvm/lib/Target/X86/X86ISelLowering.cpp:22503
 static SDValue LowerFROUND(SDValue Op, SelectionDAG &DAG) {
+  if (Op.getOpcode() == ISD::STRICT_FROUND &&
+      Op.getSimpleValueType() == MVT::f16)
----------------
pengfei wrote:
> FreddyYe wrote:
> > pengfei wrote:
> > > Can we customize `STRICT_FROUND` here too? I think you just need to chain the FP nodes togerther.
> > @craig.topper created this function originally. He mentions 
> > 
> > > Constrained intrinsics would use STRICT_FROUND which won't go through this code.
> > 
> >  at https://reviews.llvm.org/D73607. Hi Craig, can we chain the FP nodes here?
> Oh, I see. Can we return SDValue() so that we can call lib function finally?
No, that causes abort for now since round(fp16) is not handled yet in LLVM. I suppose libm hasn't supoprted yet?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D110312/new/

https://reviews.llvm.org/D110312



More information about the llvm-commits mailing list