[PATCH] D98388: [RISCV][Clang] Add RVV vle/vse intrinsic functions.

Zakk Chen via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Mar 12 08:59:59 PST 2021


khchen marked 6 inline comments as done.
khchen added inline comments.


================
Comment at: clang/utils/TableGen/RISCVVEmitter.cpp:689
+      skew = 1;
+    for (unsigned i = 0; i < PermuteOperands.size(); ++i) {
+      if (i != PermuteOperands[i])
----------------
rogfer01 wrote:
> These are only suggestions of sanity checks we could do here:
> - I understand `PermuteOperand.size()` should be `<=` than `CTypeOrder.size()`. 
> - Also `PermuteOperands[i] + skew` should be `<` than `CTypeOrder.size()`. right?
> - We could check the result is indeed a permutation (e.g. sorting a copy of `CTypeOrder` is equivalent to the iota above). This one might be expensive although the sequences are short, not sure.
> Also PermuteOperands[i] + skew should be < than CTypeOrder.size(). right
Yes.
I did the different way to do sanity checks, maybe it's better.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D98388



More information about the cfe-commits mailing list