[PATCH] D130028: [SelectionDAG] Fix fptoi.sat scalable vector lowering

Dave Green via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 19 01:18:34 PDT 2022


dmgreen updated this revision to Diff 445716.
dmgreen edited the summary of this revision.
dmgreen added a comment.

This now adds SELECT_CC into VectorLegalizer::Expand for scalable vectors, expanding into a SETCC and a DAG.getSelect. The code in TargetLowering::expandFP_TO_INT_SAT is now unchanged, and an assert is added for checking the type of a vector select_cc condition is a vector.

I can change the expansion of FP_TO_INT_SAT to scalable vectors only if that is preferred to keep this patch a scalable-vector fix. Let me know.


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

https://reviews.llvm.org/D130028

Files:
  llvm/lib/CodeGen/SelectionDAG/LegalizeVectorOps.cpp
  llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
  llvm/test/CodeGen/AArch64/fptosi-sat-vector.ll
  llvm/test/CodeGen/AArch64/fptoui-sat-vector.ll
  llvm/test/CodeGen/AArch64/sve-fptosi-sat.ll
  llvm/test/CodeGen/AArch64/sve-fptoui-sat.ll
  llvm/test/CodeGen/RISCV/rvv/fptosi-sat.ll
  llvm/test/CodeGen/RISCV/rvv/fptoui-sat.ll
  llvm/test/CodeGen/Thumb2/mve-fptosi-sat-vector.ll
  llvm/test/CodeGen/Thumb2/mve-fptoui-sat-vector.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D130028.445716.patch
Type: text/x-patch
Size: 212374 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220719/9ff4100c/attachment-0001.bin>


More information about the llvm-commits mailing list