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 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits