[PATCH] D125760: [LegalizeTypes][VP] Add integer promotion support for vp.fptosi/vp.fptoui

Pretty-box via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed May 18 00:15:32 PDT 2022


Pretty-box added inline comments.


================
Comment at: llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp:673
 
+  if (N->getOpcode() == ISD::VP_FPTOUI &&
+      !TLI.isOperationLegal(ISD::VP_FPTOUI, NVT) &&
----------------
craig.topper wrote:
> Pretty-box wrote:
> > Does this code need to be added?Because ISD::VP_FPTOUI/ISD::VP_FPTOSI is considered illegal on RISCV(use custom model) . From the illegal FPTOUI test results, signed conversion instruction is used rather than unsigned conversion instruction. Is this result correct?@craig.topper
> Does the same thing happen with non-vp for fixed vectors?
Yes, you can refer to the new added test cases,the fptoui tests using signed conversion instructions.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D125760



More information about the llvm-commits mailing list