[PATCH] D95016: [Clang][RISCV] Add custom TableGen backend for riscv-vector intrinsics.

Craig Topper via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Feb 26 11:34:59 PST 2021


craig.topper added inline comments.


================
Comment at: clang/utils/TableGen/RISCVVEmitter.cpp:259-260
+
+LMULType &LMULType::operator*=(unsigned RHS) {
+  this->Log2LMUL = this->Log2LMUL + RHS;
+  return *this;
----------------
jrtc27 wrote:
> That's not how multiplication works. This is exponentiation. Multiplication would be `Log2LMul + log2(RHS)`. Please don't abuse operators like this.
This seems like it must be broken, but since we don't do widening or narrowing in this patch we didn't notice?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D95016



More information about the cfe-commits mailing list