[PATCH] D134400: [RISCV] Improve support for vector fp_to_sint_sat/uint_sat.

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 21 21:14:01 PDT 2022


craig.topper added inline comments.


================
Comment at: llvm/lib/Target/RISCV/RISCVISelLowering.cpp:1919-1923
+    DstContainerVT = getContainerForFixedLengthVector(DAG, DstVT, Subtarget);
+    SrcContainerVT = getContainerForFixedLengthVector(DAG, SrcVT, Subtarget);
+    assert(DstContainerVT.getVectorElementCount() ==
+               SrcContainerVT.getVectorElementCount() &&
+           "Expected same element count");
----------------
HanKuanChen wrote:
> check `DstVT.getVectorNumElements()` and `SrcVT.getVectorNumElements()` before `getContainerForFixedLengthVector`?
That's guaranteed by the intrinsic definition. What we need to ensure here is that the conversion from fixed to scalable is independent of the element size and only depends on the number of elements. This hasn't always been true.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D134400



More information about the llvm-commits mailing list