[PATCH] D116771: [RISCV] Add DAG combine to fold (fp_to_int (ffloor X)) -> (fcvt X, rdn)

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 10 15:33:27 PST 2022


craig.topper added inline comments.


================
Comment at: llvm/lib/Target/RISCV/RISCVISelLowering.cpp:7058
+
+  // Don't do this for f16 with Zfhmin and not Zfh.
+  if (Src.getValueType() == MVT::f16 && !Subtarget.hasStdExtZfh())
----------------
asb wrote:
> Is it possible to add some test coverage for this?
No because we don't have f16 as a legal type with Zfhmin yet. I was coding defensively assuming that would change in the future and I didn't want someone to have to audit for it.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D116771



More information about the llvm-commits mailing list