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

Pengfei Wang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Sep 26 00:41:51 PDT 2021


pengfei added inline comments.


================
Comment at: llvm/lib/Target/X86/X86ISelLowering.cpp:1954-1957
+    setOperationAction(ISD::STRICT_FROUND,        MVT::f16, Custom);
+    setOperationAction(ISD::FROUND,               MVT::f16, Custom);
+    setOperationAction(ISD::FROUNDEVEN,           MVT::f16, Legal);
+    setOperationAction(ISD::STRICT_FROUNDEVEN,    MVT::f16, Legal);
----------------
How about the vector type?


================
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)
----------------
Can we customize `STRICT_FROUND` here too? I think you just need to chain the FP nodes togerther.


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